{"repo":"reframe-hpc\/reframe","instance_id":"reframe-0","base_commit":"b7d86b1d777bc3bed7a3d71d95130376ab5d2820","patch":"","test_patch":"diff --git a\/unittests\/test_sanity_functions.py b\/unittests\/test_sanity_functions.py\nindex 7e6368938..0e9367027 100644\n--- a\/unittests\/test_sanity_functions.py\n+++ b\/unittests\/test_sanity_functions.py\n@@ -473,6 +473,18 @@ def test_assert_reference():\n r'\\(l=-1\\.2, u=-0\\.9\\)'):\n sn.evaluate(sn.assert_reference(-0.8, -1, -0.2, 0.1))\n \n+ # Check that bounds are correctly calculated in case that lower bound\n+ # reaches zero (see also GH issue #3430)\n+ with pytest.raises(SanityError,\n+ match=r'1 is beyond reference value 0\\.1 '\n+ r'\\(l=0\\.0, u=0\\.1\\)'):\n+ assert sn.assert_reference(1, 0.1, -1.0, 0)\n+\n+ with pytest.raises(SanityError,\n+ match=r'-1 is beyond reference value -0\\.1 '\n+ r'\\(l=-0\\.1, u=-0\\.0\\)'):\n+ assert sn.assert_reference(-1, -0.1, 0, 1.0)\n+\n # Check invalid thresholds\n with pytest.raises(SanityError,\n match=r'invalid high threshold value: -0\\.1'):\n","problem_statement":"Performance threshold goes to -inf when it should be zero.\n\nIn attempting to create a performance test where zero is the correct value, I created the following reference (since a value of zero results in no reference check being performed; see https:\/\/github.com\/reframe-hpc\/reframe\/issues\/2857):\n\n```\n self.reference = {\n '*': {\n 'Gflops': (None, None, None, 'Gflops'),\n 'Exponent': (None, None, None, '10exp'),\n 'Time': (None, None, None, 'seconds'),\n 'failed_tests': (.1, -1.0, 0, 'tests'),\n 'skipped_tests': (.1, -1.0, 0, 'tests')\n }}\n```\nI was thinking for the failed and skipped tests, this would create a lower bound of zero and upper bound of .1, allowing zero to pass, but integers larger than that would fail.\nThis works for me in that values of zero pass, and 1 or greater values fail, but what is unexpected is that the lower bound gets set to -inf:\n\n```\n * Reason: performance error: failed to meet references: skipped_tests=1 tests, expected 0.1 (l=-inf, u=0.1)\n```\nAs an additional point of information when I set the lower bound values to -2.0 (or anything greater than 1 abs. value, to see what would happen), the following was printed:\n```\n\tinvalid low threshold value: -2.0\n\tinvalid low threshold value: -2.0\n```\nBut when I choose 2.0 as an upper bound, that seems to be fine:\n```\n 'failed_tests': (.1, -1.0, 2.0, 'tests'),\n 'skipped_tests': (.1, -1.0, 2.0, 'tests')\n```\nresults in the range being interpretted as follows:\n```\n * Reason: performance error: failed to meet references: skipped_tests=1 tests, expected 0.1 (l=-inf, u=0.30000000000000004)\n```\nIt seems to me that the treatment of lower and upper threshold values should be consistent, and this does not seem consistent.\nAlthough when I switch the reference value to a negative, that reverses the issue:\n```\n 'failed_tests': (-1.0, 0, 2.0, 'tests'),\n 'skipped_tests': (-1.0, 0, 2.0, 'tests')\n```\nresults in:\n```\n\tinvalid high threshold value: 2.0\n\tinvalid high threshold value: 2.0\n```\nand to confirm, I set the lower threshold to -2.0 with a negative reference value to check:\n```\n 'failed_tests': (-1.0, -2.0, 1.0, 'tests'),\n 'skipped_tests': (-1.0, -2.0, 1.0, 'tests')\n```\nresults in:\n```\nPASSED\n```\nMeaning there was no error with the -2.0 reference value in this case. I am not sure what value the upper bound was getting set to in this case, since it wasn't printed out, but since there was no error, it must not be getting set to zero. If it matches the pattern, I am thinking it might be set to inf.\nI am thinking there is something odd that happens when the threshold range crosses zero or has one end that is zero.","hint_text":null,"created_at":"2025-03-18 08:54:38","closed_at":"2025-03-18 08:54:38","version":"0.3.88","FAIL_TO_PASS":[],"PASS_TO_PASS":["unittests\/test_sanity_functions.py::test_assert_ge_with_deferrables","unittests\/test_sanity_functions.py::test_assert_in","unittests\/test_sanity_functions.py::test_count_uniq","unittests\/test_sanity_functions.py::test_assert_false_with_deferrables","unittests\/test_sanity_functions.py::test_assert_not_in","unittests\/test_sanity_functions.py::test_assert_eq","unittests\/test_sanity_functions.py::test_print_separator","unittests\/test_sanity_functions.py::test_all","unittests\/test_sanity_functions.py::test_extractall[extractall_s]","unittests\/test_sanity_functions.py::test_assert_gt_with_deferrables","unittests\/test_sanity_functions.py::test_assert_ne_with_deferrables","unittests\/test_sanity_functions.py::test_hasattr","unittests\/test_sanity_functions.py::test_chain","unittests\/test_sanity_functions.py::test_assert_reference","unittests\/test_sanity_functions.py::test_or","unittests\/test_sanity_functions.py::test_print_stderr","unittests\/test_sanity_functions.py::test_extractsingle[extractsingle_s]","unittests\/test_sanity_functions.py::test_map","unittests\/test_sanity_functions.py::test_abs","unittests\/test_sanity_functions.py::test_extractall_encoding","unittests\/test_sanity_functions.py::test_assert_not_in_with_deferrables","unittests\/test_sanity_functions.py::test_path_isdir","unittests\/test_sanity_functions.py::test_extractall_multiple_tags[extractall]","unittests\/test_sanity_functions.py::test_assert_found_encoding","unittests\/test_sanity_functions.py::test_any","unittests\/test_sanity_functions.py::test_glob","unittests\/test_sanity_functions.py::test_assert_found[assert_found_s]","unittests\/test_sanity_functions.py::test_assert_in_with_deferrables","unittests\/test_sanity_functions.py::test_allx","unittests\/test_sanity_functions.py::test_assert_true_with_deferrables","unittests\/test_sanity_functions.py::test_findall_encoding","unittests\/test_sanity_functions.py::test_extractall_multiple_tags[extractall_s]","unittests\/test_sanity_functions.py::test_extractsingle[extractsingle]","unittests\/test_sanity_functions.py::test_avg","unittests\/test_sanity_functions.py::test_extractsingle_encoding","unittests\/test_sanity_functions.py::test_max","unittests\/test_sanity_functions.py::test_findall_invalid_file","unittests\/test_sanity_functions.py::test_extractall_invalid_file","unittests\/test_sanity_functions.py::test_path_exists","unittests\/test_sanity_functions.py::test_print_end","unittests\/test_sanity_functions.py::test_round","unittests\/test_sanity_functions.py::test_findall[findall_s]","unittests\/test_sanity_functions.py::test_assert_le_with_deferrables","unittests\/test_sanity_functions.py::test_assert_eq_with_deferrables","unittests\/test_sanity_functions.py::test_sum","unittests\/test_sanity_functions.py::test_assert_ne","unittests\/test_sanity_functions.py::test_zip","unittests\/test_sanity_functions.py::test_assert_gt","unittests\/test_sanity_functions.py::test_assert_not_found[assert_not_found]","unittests\/test_sanity_functions.py::test_reversed","unittests\/test_sanity_functions.py::test_assert_not_found_encoding","unittests\/test_sanity_functions.py::test_print_stdout","unittests\/test_sanity_functions.py::test_enumerate","unittests\/test_sanity_functions.py::test_assert_not_found[assert_not_found_s]","unittests\/test_sanity_functions.py::test_extractall_error[extractall_s]","unittests\/test_sanity_functions.py::test_len","unittests\/test_sanity_functions.py::test_assert_lt_with_deferrables","unittests\/test_sanity_functions.py::test_sorted","unittests\/test_sanity_functions.py::test_extractall_custom_conv[extractall]","unittests\/test_sanity_functions.py::test_assert_found[assert_found]","unittests\/test_sanity_functions.py::test_findall[findall]","unittests\/test_sanity_functions.py::test_getitem","unittests\/test_sanity_functions.py::test_extractall[extractall]","unittests\/test_sanity_functions.py::test_min","unittests\/test_sanity_functions.py::test_assert_ge","unittests\/test_sanity_functions.py::test_assert_lt","unittests\/test_sanity_functions.py::test_extractall_error[extractall]","unittests\/test_sanity_functions.py::test_assert_bounded","unittests\/test_sanity_functions.py::test_getitem_with_deferrables","unittests\/test_sanity_functions.py::test_count","unittests\/test_sanity_functions.py::test_safe_format","unittests\/test_sanity_functions.py::test_and","unittests\/test_sanity_functions.py::test_extractall_custom_conv[extractall_s]","unittests\/test_sanity_functions.py::test_iglob","unittests\/test_sanity_functions.py::test_path_isfile","unittests\/test_sanity_functions.py::test_setattr","unittests\/test_sanity_functions.py::test_assert_le","unittests\/test_sanity_functions.py::test_path_islink","unittests\/test_sanity_functions.py::test_assert_true","unittests\/test_sanity_functions.py::test_assert_false","unittests\/test_sanity_functions.py::test_filter"],"environment_setup_commit":null,"command_build":"pip install -e .;\npip install pytest pytest-json-report;","command_test":"pytest --json-report --json-report-file=report_pytest.json","image_name":"python:3.11","meta":null,"command_test_small":"pytest --json-report --json-report-file=report_pytest.json unittests\/test_sanity_functions.py","timeout_build":3000,"timeout_test":600,"gold_patch":"diff --git a\/reframe\/utility\/sanity.py b\/reframe\/utility\/sanity.py\nindex a4f57a301..1228586ff 100644\n--- a\/reframe\/utility\/sanity.py\n+++ b\/reframe\/utility\/sanity.py\n@@ -8,6 +8,7 @@\n import contextlib\n import glob as pyglob\n import itertools\n+import math\n import os\n import re\n import sys\n@@ -576,8 +577,14 @@ def calc_bound(thres):\n \n return ref*(1 + thres)\n \n- lower = calc_bound(lower_thres) or float('-inf')\n- upper = calc_bound(upper_thres) or float('inf')\n+ lower = calc_bound(lower_thres)\n+ if lower is None:\n+ lower = -math.inf\n+\n+ upper = calc_bound(upper_thres)\n+ if upper is None:\n+ upper = math.inf\n+\n try:\n evaluate(assert_bounded(val, lower, upper))\n except SanityError:\n"} {"repo":"PyCQA\/pyflakes","instance_id":"pyflakes-1","base_commit":"433dfd001746a69d12597f7c97af78c13e1f662e","patch":"","test_patch":"diff --git a\/pyflakes\/test\/test_other.py b\/pyflakes\/test\/test_other.py\nindex 68c38e95..23990820 100644\n--- a\/pyflakes\/test\/test_other.py\n+++ b\/pyflakes\/test\/test_other.py\n@@ -1744,6 +1744,13 @@ def test_assign_expr(self):\n print(x)\n ''')\n \n+ def test_assign_expr_after_annotation(self):\n+ self.flakes(\"\"\"\n+ a: int\n+ print(a := 3)\n+ print(a)\n+ \"\"\")\n+\n def test_assign_expr_generator_scope(self):\n \"\"\"Test assignment expressions in generator expressions.\"\"\"\n self.flakes('''\n","problem_statement":"Walrus operator + annotation can cause F821 in version 3.3.0\n\nIn order to type hint a variable used in a walrus expression, I put the type hint outside of the expression like in the following example (test.py):\n\n```\na: int\nif a := 3:\n print(a)\n\nprint(a)\n```\n\nVariable \"a\" is defined in both places\n\n```\n$ python3 test.py\n3\n3\n```\n\nIn pyflakes version 3.2.0 this produced no errors\n\n```pip install flake8==7.1.2 pyflakes==3.2.0```\n\n```\n$ flake8 test.py\n```\n\nIn pyflakes version 3.3.0 this produces F821 even though \"a\" is defined\n\n```pip install flake8==7.2.0 pyflakes==3.3.0```\n\n```\n$ flake8 test.py\ntest.py:3:11: F821 undefined name 'a'\ntest.py:5:7: F821 undefined name 'a'\n```\n\nI am on Windows with Python version 3.12.8","hint_text":null,"created_at":"2025-03-30 21:54:34","closed_at":"2025-03-30 21:54:34","version":"0.3.88","FAIL_TO_PASS":["pyflakes\/test\/test_other.py::TestUnusedAssignment::test_unusedReassignedVariable","pyflakes\/test\/test_other.py::Test::test_doubleAssignment"],"PASS_TO_PASS":["pyflakes\/test\/test_other.py::TestStringFormatting::test_invalid_percent_format_calls","pyflakes\/test\/test_other.py::TestUnusedAssignment::test_unusedVariable","pyflakes\/test\/test_other.py::TestUnusedAssignment::test_exceptionUnusedInExceptInFunction","pyflakes\/test\/test_other.py::TestAsyncStatements::test_asyncDefAwait","pyflakes\/test\/test_other.py::Test::test_duplicateArgs","pyflakes\/test\/test_other.py::TestUnusedAssignment::test_variableUsedInLoop","pyflakes\/test\/test_other.py::Test::test_varAugmentedAssignment","pyflakes\/test\/test_other.py::Test::test_unused_global_statement_not_marked_as_used_by_nested_scope","pyflakes\/test\/test_other.py::TestAsyncStatements::test_raise_notimplemented","pyflakes\/test\/test_other.py::Test::test_redefinedInGenerator","pyflakes\/test\/test_other.py::TestUnusedAssignment::test_withStatementSubscriptUndefined","pyflakes\/test\/test_other.py::Test::test_classNameUndefinedInClassBody","pyflakes\/test\/test_other.py::TestUnusedAssignment::test_withStatementSingleNameRedefined","pyflakes\/test\/test_other.py::Test::test_extendedSlice","pyflakes\/test\/test_other.py::Test::test_modernProperty","pyflakes\/test\/test_other.py::Test::test_containment","pyflakes\/test\/test_other.py::TestAsyncStatements::test_asyncDef","pyflakes\/test\/test_other.py::Test::test_redefinedIfElseInListComp","pyflakes\/test\/test_other.py::TestUnusedAssignment::test_setComprehensionAndLiteral","pyflakes\/test\/test_other.py::Test::test_continueOutsideLoop","pyflakes\/test\/test_other.py::TestUnusedAssignment::test_exceptWithoutNameInFunction","pyflakes\/test\/test_other.py::TestUnusedAssignment::test_withStatementSubscript","pyflakes\/test\/test_other.py::TestUnusedAssignment::test_withStatementTupleNamesUndefined","pyflakes\/test\/test_other.py::Test::test_starredAssignmentNoError","pyflakes\/test\/test_other.py::TestUnusedAssignment::test_withStatementTupleNamesRedefined","pyflakes\/test\/test_other.py::TestUnusedAssignment::test_assignToGlobal","pyflakes\/test\/test_other.py::Test::test_redefined_function_shadows_variable","pyflakes\/test\/test_other.py::TestAsyncStatements::test_asyncForUnderscoreLoopVar","pyflakes\/test\/test_other.py::Test::test_classWithYieldFrom","pyflakes\/test\/test_other.py::TestIncompatiblePrintOperator::test_print_in_lambda","pyflakes\/test\/test_other.py::TestUnusedAssignment::test_assert_without_message","pyflakes\/test\/test_other.py::TestUnusedAssignment::test_dictComprehension","pyflakes\/test\/test_other.py::Test::test_classRedefinedAsFunction","pyflakes\/test\/test_other.py::Test::test_classWithYield","pyflakes\/test\/test_other.py::TestIncompatiblePrintOperator::test_print_returned_in_function","pyflakes\/test\/test_other.py::Test::test_classFunctionDecorator","pyflakes\/test\/test_other.py::Test::test_redefinedInDictComprehension","pyflakes\/test\/test_other.py::TestUnusedAssignment::test_unusedVariableNoLocals","pyflakes\/test\/test_other.py::Test::test_continueInsideLoop","pyflakes\/test\/test_other.py::Test::test_function_arguments","pyflakes\/test\/test_other.py::Test::test_redefinedTryExceptFunction","pyflakes\/test\/test_other.py::TestUnusedAssignment::test_exceptWithoutNameInFunctionTuple","pyflakes\/test\/test_other.py::TestIncompatiblePrintOperator::test_print_function_assignment","pyflakes\/test\/test_other.py::TestUnusedAssignment::test_listUnpacking","pyflakes\/test\/test_other.py::TestIncompatiblePrintOperator::test_valid_print","pyflakes\/test\/test_other.py::Test::test_function_arguments_python3","pyflakes\/test\/test_other.py::TestStringFormatting::test_f_string_without_placeholders","pyflakes\/test\/test_other.py::Test::test_redefinedClassFunction","pyflakes\/test\/test_other.py::TestUnusedAssignment::test_assignmentInsideLoop","pyflakes\/test\/test_other.py::TestIncompatiblePrintOperator::test_invalid_print_when_imported_from_future","pyflakes\/test\/test_other.py::Test::test_unused_nonlocal_statement","pyflakes\/test\/test_other.py::Test::test_breakOutsideLoop","pyflakes\/test\/test_other.py::Test::test_moduleWithYieldFrom","pyflakes\/test\/test_other.py::Test::test_defaultExceptNotLast","pyflakes\/test\/test_other.py::TestUnusedAssignment::test_assert_tuple_empty","pyflakes\/test\/test_other.py::TestUnusedAssignment::test_withStatementComplicatedTarget","pyflakes\/test\/test_other.py::Test::test_identity","pyflakes\/test\/test_other.py::TestUnusedAssignment::test_withStatementUndefinedInside","pyflakes\/test\/test_other.py::Test::test_attrAugmentedAssignment","pyflakes\/test\/test_other.py::TestUnusedAssignment::test_if_tuple","pyflakes\/test\/test_other.py::Test::test_localReferencedBeforeAssignment","pyflakes\/test\/test_other.py::TestUnusedAssignment::test_withStatementNameDefinedInBody","pyflakes\/test\/test_other.py::Test::test_redefinedUnderscoreFunction","pyflakes\/test\/test_other.py::TestUnusedAssignment::test_ifexp","pyflakes\/test\/test_other.py::TestAsyncStatements::test_asyncFor","pyflakes\/test\/test_other.py::TestUnusedAssignment::test_closedOver","pyflakes\/test\/test_other.py::TestUnusedAssignment::test_debuggerskipSpecialVariable","pyflakes\/test\/test_other.py::TestAsyncStatements::test_formatstring","pyflakes\/test\/test_other.py::TestAsyncStatements::test_matmul","pyflakes\/test\/test_other.py::TestAsyncStatements::test_asyncDefUndefined","pyflakes\/test\/test_other.py::TestUnusedAssignment::test_assert_tuple","pyflakes\/test\/test_other.py::TestUnusedAssignment::test_augmentedAssignmentImportedFunctionCall","pyflakes\/test\/test_other.py::Test::test_redefinedInSetComprehension","pyflakes\/test\/test_other.py::Test::test_moduleWithReturn","pyflakes\/test\/test_other.py::TestUnusedAssignment::test_assign_expr_nested","pyflakes\/test\/test_other.py::TestUnusedAssignment::test_tupleUnpacking","pyflakes\/test\/test_other.py::Test::test_loopControl","pyflakes\/test\/test_other.py::Test::test_redefinedIfFunction","pyflakes\/test\/test_other.py::TestAsyncStatements::test_asyncWith","pyflakes\/test\/test_other.py::TestUnusedAssignment::test_withStatementListNames","pyflakes\/test\/test_other.py::Test::test_functionRedefinedAsClass","pyflakes\/test\/test_other.py::TestUnusedAssignment::test_f_string","pyflakes\/test\/test_other.py::TestUnusedAssignment::test_withStatementSingleName","pyflakes\/test\/test_other.py::TestIncompatiblePrintOperator::test_print_augmented_assign","pyflakes\/test\/test_other.py::Test::test_moduleWithYield","pyflakes\/test\/test_other.py::TestAsyncStatements::test_loopControlInAsyncForElse","pyflakes\/test\/test_other.py::Test::test_comparison","pyflakes\/test\/test_other.py::TestUnusedAssignment::test_generatorExpression","pyflakes\/test\/test_other.py::TestUnusedAssignment::test_withStatementTupleNames","pyflakes\/test\/test_other.py::Test::test_redefinedFunction","pyflakes\/test\/test_other.py::TestUnusedAssignment::test_withStatementSingleNameUndefined","pyflakes\/test\/test_other.py::Test::test_doubleAssignmentConditionally","pyflakes\/test\/test_other.py::TestUnusedAssignment::test_doubleClosedOver","pyflakes\/test\/test_other.py::TestAsyncStatements::test_asyncWithItem","pyflakes\/test\/test_other.py::TestStringFormatting::test_invalid_dot_format_calls","pyflakes\/test\/test_other.py::Test::test_defaultExceptLast","pyflakes\/test\/test_other.py::TestUnusedAssignment::test_assert_static","pyflakes\/test\/test_other.py::Test::test_undefinedBaseClass","pyflakes\/test\/test_other.py::Test::test_unused_global_statement","pyflakes\/test\/test_other.py::TestUnusedAssignment::test_assign_expr_generator_scope_reassigns_parameter","pyflakes\/test\/test_other.py::TestUnusedAssignment::test_assign_expr_generator_scope","pyflakes\/test\/test_other.py::TestUnusedAssignment::test_yieldFromUndefined","pyflakes\/test\/test_other.py::Test::test_classRedefinition","pyflakes\/test\/test_other.py::Test::test_globalDeclaredInDifferentScope","pyflakes\/test\/test_other.py::TestUnusedAssignment::test_assignInListComprehension","pyflakes\/test\/test_other.py::Test::test_unaryPlus","pyflakes\/test\/test_other.py::TestStringFormatting::test_ok_percent_format_cannot_determine_element_count","pyflakes\/test\/test_other.py::TestUnusedAssignment::test_assign_expr","pyflakes\/test\/test_other.py::TestUnusedAssignment::test_assignToNonlocal","pyflakes\/test\/test_other.py::Test::test_classNameDefinedPreviously","pyflakes\/test\/test_other.py::TestUnusedAssignment::test_withStatementAttributeName","pyflakes\/test\/test_other.py::Test::test_classWithReturn","pyflakes\/test\/test_other.py::Test::test_redefinedTryFunction","pyflakes\/test\/test_other.py::TestUnusedAssignment::test_tracebackhideSpecialVariable","pyflakes\/test\/test_other.py::TestUnusedAssignment::test_exceptionUnusedInExcept","pyflakes\/test\/test_other.py::Test::test_starredAssignmentErrors","pyflakes\/test\/test_other.py::TestUnusedAssignment::test_unusedUnderscoreVariable","pyflakes\/test\/test_other.py::Test::test_functionDecorator","pyflakes\/test\/test_other.py::TestIncompatiblePrintOperator::test_print_as_condition_test","pyflakes\/test\/test_other.py::TestUnusedAssignment::test_assign_expr_after_annotation","pyflakes\/test\/test_other.py::Test::test_breakInsideLoop","pyflakes\/test\/test_other.py::TestUnusedAssignment::test_withStatementUndefinedInExpression","pyflakes\/test\/test_other.py::TestUnusedAssignment::test_assignToMember","pyflakes\/test\/test_other.py::TestUnusedAssignment::test_withStatementNoNames","pyflakes\/test\/test_other.py::TestUnusedAssignment::test_assert_with_message","pyflakes\/test\/test_other.py::Test::test_doubleAssignmentWithUse","pyflakes\/test\/test_other.py::TestUnusedAssignment::test_exceptionUsedInExcept","pyflakes\/test\/test_other.py::Test::test_redefinedIfElseFunction","pyflakes\/test\/test_other.py::Test::test_ellipsis","pyflakes\/test\/test_other.py::TestAsyncStatements::test_loopControlInAsyncFor","pyflakes\/test\/test_other.py::TestUnusedAssignment::test_unusedVariableAsLocals","pyflakes\/test\/test_other.py::Test::test_redefinedUnderscoreImportation","pyflakes\/test\/test_other.py::TestUnusedAssignment::test_assignInForLoop","pyflakes\/test\/test_other.py::TestUnusedAssignment::test_exception_unused_in_except_star"],"environment_setup_commit":null,"command_build":"pip install -e .;\npip install pytest pytest-json-report;","command_test":"pytest --json-report --json-report-file=report_pytest.json","image_name":"python:3.11","meta":null,"command_test_small":"pytest --json-report --json-report-file=report_pytest.json pyflakes\/test\/test_other.py","timeout_build":3000,"timeout_test":600,"gold_patch":"diff --git a\/pyflakes\/checker.py b\/pyflakes\/checker.py\nindex c7d3e882..9888d7ac 100644\n--- a\/pyflakes\/checker.py\n+++ b\/pyflakes\/checker.py\n@@ -1008,8 +1008,12 @@ def addBinding(self, node, value):\n for scope in reversed(self.scopeStack)\n if not isinstance(scope, GeneratorScope)\n )\n- # it may be a re-assignment to an already existing name\n- scope.setdefault(value.name, value)\n+ if value.name in scope and isinstance(scope[value.name], Annotation):\n+ # re-assignment to name that was previously only an annotation\n+ scope[value.name] = value\n+ else:\n+ # it may be a re-assignment to an already existing name\n+ scope.setdefault(value.name, value)\n else:\n self.scope[value.name] = value\n \n"} {"repo":"tobymao\/sqlglot","instance_id":"sqlglot-2","base_commit":"08eb7f2032957c2fe3119963f344538b90d8f631","patch":"","test_patch":"diff --git a\/tests\/dialects\/test_mysql.py b\/tests\/dialects\/test_mysql.py\nindex 06638f16c5..4a28176ccf 100644\n--- a\/tests\/dialects\/test_mysql.py\n+++ b\/tests\/dialects\/test_mysql.py\n@@ -83,6 +83,12 @@ def test_ddl(self):\n self.validate_identity(\n \"CREATE OR REPLACE VIEW my_view AS SELECT column1 AS `boo`, column2 AS `foo` FROM my_table WHERE column3 = 'some_value' UNION SELECT q.* FROM fruits_table, JSON_TABLE(Fruits, '$[*]' COLUMNS(id VARCHAR(255) PATH '$.$id', value VARCHAR(255) PATH '$.value')) AS q\",\n )\n+ self.validate_identity(\n+ \"CREATE TABLE test_table (id INT AUTO_INCREMENT, PRIMARY KEY (id) USING BTREE)\"\n+ )\n+ self.validate_identity(\n+ \"CREATE TABLE test_table (id INT AUTO_INCREMENT, PRIMARY KEY (id) USING HASH)\"\n+ )\n self.validate_identity(\n \"\/*left*\/ EXPLAIN SELECT \/*hint*\/ col FROM t1 \/*right*\/\",\n \"\/* left *\/ DESCRIBE \/* hint *\/ SELECT col FROM t1 \/* right *\/\",\n","problem_statement":"MySQL dialect fails to parse PRIMARY KEY USING BTREE syntax\n\n**Before you file an issue**\n- Make sure you specify the \"read\" dialect eg. `parse_one(sql, read=\"spark\")`\n- Make sure you specify the \"write\" dialect eg. `ast.sql(dialect=\"duckdb\")`\n- Check if the issue still exists on main\nyes, the issue still exists. I'v tried the latest version.\n**Fully reproducible code snippet**\nPlease include a fully reproducible code snippet or the input sql, dialect, and expected output.\nmysql:\n`CREATE TABLE test_table (\n\tid INT AUTO_INCREMENT,\n\talarm_category VARCHAR ( 255 ),\n\talarm_rule VARCHAR ( 255 ),\nPRIMARY KEY(id) USING BTREE \n)`\n\n**Official Documentation**\nPlease include links to official SQL documentation related to your issue.\nhttps:\/\/sqlglot.com\/sqlglot.html#parse_one\n\n\nreproduce\n```python\nsql = \"CREATE TABLE test_table ( id INT AUTO_INCREMENT, alarm_category VARCHAR ( 255 ), alarm_rule VARCHAR ( 255 ), PRIMARY KEY(id) USING BTREE )\"\nsqlglot.parse_one(sql,read='mysql')\n\n# result\n\n# sqlglot.errors.ParseError: Expecting ). Line 1, Col: 130.\n# id INT AUTO_INCREMENT, alarm_category VARCHAR ( 255 ), alarm_rule VARCHAR ( 255 ), PRIMARY KEY(id) USING BTREE )\n```\nthis is the reproducible python code","hint_text":null,"created_at":"2025-03-05 15:49:35","closed_at":"2025-03-05 15:49:35","version":"0.3.88","FAIL_TO_PASS":[],"PASS_TO_PASS":["tests\/dialects\/test_mysql.py::TestMySQL::test_show_like_or_where","tests\/dialects\/test_mysql.py::TestMySQL::test_identity","tests\/dialects\/test_mysql.py::TestMySQL::test_string_literals","tests\/dialects\/test_mysql.py::TestMySQL::test_show_columns","tests\/dialects\/test_mysql.py::TestMySQL::test_types","tests\/dialects\/test_mysql.py::TestMySQL::test_show_name","tests\/dialects\/test_mysql.py::TestMySQL::test_at_time_zone","tests\/dialects\/test_mysql.py::TestMySQL::test_convert","tests\/dialects\/test_mysql.py::TestMySQL::test_ddl","tests\/dialects\/test_mysql.py::TestMySQL::test_show_simple","tests\/dialects\/test_mysql.py::TestMySQL::test_show_processlist","tests\/dialects\/test_mysql.py::TestMySQL::test_match_against","tests\/dialects\/test_mysql.py::TestMySQL::test_number_format","tests\/dialects\/test_mysql.py::TestMySQL::test_show_db_like_or_where_sql","tests\/dialects\/test_mysql.py::TestMySQL::test_json_value","tests\/dialects\/test_mysql.py::TestMySQL::test_grant","tests\/dialects\/test_mysql.py::TestMySQL::test_date_format","tests\/dialects\/test_mysql.py::TestMySQL::test_timestamp_trunc","tests\/dialects\/test_mysql.py::TestMySQL::test_show_profile","tests\/dialects\/test_mysql.py::TestMySQL::test_show_grants","tests\/dialects\/test_mysql.py::TestMySQL::test_mysql","tests\/dialects\/test_mysql.py::TestMySQL::test_show_index","tests\/dialects\/test_mysql.py::TestMySQL::test_bits_literal","tests\/dialects\/test_mysql.py::TestMySQL::test_hexadecimal_literal","tests\/dialects\/test_mysql.py::TestMySQL::test_mysql_time","tests\/dialects\/test_mysql.py::TestMySQL::test_mysql_time_python311","tests\/dialects\/test_mysql.py::TestMySQL::test_canonical_functions","tests\/dialects\/test_mysql.py::TestMySQL::test_show_engine","tests\/dialects\/test_mysql.py::TestMySQL::test_analyze","tests\/dialects\/test_mysql.py::TestMySQL::test_show_events","tests\/dialects\/test_mysql.py::TestMySQL::test_is_null","tests\/dialects\/test_mysql.py::TestMySQL::test_show_tables","tests\/dialects\/test_mysql.py::TestMySQL::test_json_object","tests\/dialects\/test_mysql.py::TestMySQL::test_monthname","tests\/dialects\/test_mysql.py::TestMySQL::test_explain","tests\/dialects\/test_mysql.py::TestMySQL::test_set_variable","tests\/dialects\/test_mysql.py::TestMySQL::test_show_replica_status","tests\/dialects\/test_mysql.py::TestMySQL::test_show_errors","tests\/dialects\/test_mysql.py::TestMySQL::test_introducers","tests\/dialects\/test_mysql.py::TestMySQL::test_escape","tests\/dialects\/test_mysql.py::TestMySQL::test_safe_div"],"environment_setup_commit":null,"command_build":"pip install -e .;\npip install pytest pytest-json-report;","command_test":"pytest --json-report --json-report-file=report_pytest.json","image_name":"python:3.11","meta":null,"command_test_small":"pytest --json-report --json-report-file=report_pytest.json tests\/dialects\/test_mysql.py","timeout_build":3000,"timeout_test":600,"gold_patch":"diff --git a\/sqlglot\/parser.py b\/sqlglot\/parser.py\nindex 24bf1492f7..f5ed3a8923 100644\n--- a\/sqlglot\/parser.py\n+++ b\/sqlglot\/parser.py\n@@ -1291,6 +1291,10 @@ class Parser(metaclass=_Parser):\n \"SIMPLE\",\n ),\n \"INITIALLY\": (\"DEFERRED\", \"IMMEDIATE\"),\n+ \"USING\": (\n+ \"BTREE\",\n+ \"HASH\",\n+ ),\n **dict.fromkeys((\"DEFERRABLE\", \"NORELY\"), tuple()),\n }\n \n"} {"repo":"matchms\/matchms","instance_id":"matchms-3","base_commit":"0b1707bd866f56404e4056df678af12a4bc20141","patch":"","test_patch":"diff --git a\/tests\/importing\/test_load_from_msp.py b\/tests\/importing\/test_load_from_msp.py\nindex 891ac002..839b604c 100644\n--- a\/tests\/importing\/test_load_from_msp.py\n+++ b\/tests\/importing\/test_load_from_msp.py\n@@ -2,7 +2,7 @@ import os\n import numpy as np\n import pytest\n from matchms import Spectrum\n-from matchms.importing.load_from_msp import load_from_msp, parse_metadata\n+from matchms.importing.load_from_msp import get_peak_values, load_from_msp, parse_metadata\n from tests.builder_Spectrum import SpectrumBuilder\n \n \n@@ -285,3 +285,13 @@ def test_parse_metadata(input_line, expected_output):\n params = {}\n parse_metadata(input_line, params)\n assert params == expected_output\n+\n+\n+@pytest.mark.parametrize(\"line, expected\", [\n+ [\"496\t7.1E-05\", ([496.0], [7.1E-05])],\n+ [\"496\t7.1e-05\", ([496.0], [7.1e-05])],\n+ [\"85:201 86:55 87:10 88:4 89:315\", ([85.0, 86.0, 87.0, 88.0, 89.0], [201.0, 55.0, 10.0, 4.0, 315.0])],\n+])\n+def test_get_peak_values(line, expected):\n+ actual = get_peak_values(line)\n+ assert actual == expected\n\\ No newline at end of file\n","problem_statement":"matchms fails when reading spectra where abundance is in scientific notation\nExample spectrum - spotted in the MSDial EI RI library.\n\nFunny thing is our regex only handles lower case `e` notation while this uses upper case.\n\nMakes me think if we shouldn't just leave the parsing of stuff to python and try to just identify the tokens based on separator?\n\n``` tokens = re.findall(r\"(\\d+(?:\\.\\d+)?(?:e[-+]?\\d+)?)\", peak)```\n```\nNAME: C10 FAME\nEXACTMASS: 186.16198\nFORMULA: C11H22O2\nONTOLOGY: Fatty acid methyl esters\nINCHIKEY: YRHYCMZPEVDGFQ-UHFFFAOYSA-N\nSMILES: CCCCCCCCCC(=O)OC\nRETENTIONINDEX: 1325\nIONMODE: Positive\nINSTRUMENTTYPE: GC-EI-TOF\nCOMMENT: DB#=FiehnLibVolatile0005; origin=Volatile Fiehn Library for Metabolic Profiling\nNum Peaks: 169\n30\t0.629467\n31\t1.545269\n33\t0.272632\n36\t0.02421\n37\t0.313882\n38\t0.539016\n39\t17.716311\n40\t1.915948\n41\t35.4716\n42\t9.51272\n43\t36.860957\n44\t0.788644\n45\t2.384747\n46\t0.104509\n47\t0.031949\n48\t0.035996\n49\t0.052609\n50\t0.529644\n51\t0.838982\n52\t0.365568\n53\t2.854753\n54\t1.750452\n55\t29.439195\n56\t4.268605\n57\t8.867918\n58\t0.591554\n59\t19.854767\n60\t0.49308\n61\t0.379342\n62\t0.260846\n63\t0.557191\n64\t0.08541\n65\t0.63394\n66\t0.192617\n67\t2.198946\n68\t1.443245\n69\t7.300356\n70\t1.714883\n71\t2.948257\n72\t0.322756\n73\t1.743069\n74\t100\n75\t9.275516\n76\t0.745407\n77\t0.361379\n78\t0.038481\n79\t0.615978\n80\t0.123323\n81\t1.452119\n82\t0.612854\n83\t3.739813\n84\t2.643535\n85\t1.788933\n86\t0.278383\n87\t44.905938\n88\t3.900623\n89\t0.580976\n90\t0.037416\n91\t0.023074\n92\t0.025701\n93\t0.21129\n94\t0.043806\n95\t0.774303\n96\t0.156408\n97\t2.040479\n98\t1.468662\n99\t0.256302\n100\t0.217679\n101\t5.157853\n102\t0.416331\n103\t0.024423\n107\t0.071992\n108\t0.018459\n109\t0.002485\n110\t0.228329\n111\t0.387719\n112\t0.390062\n113\t0.245724\n114\t0.05765\n115\t2.589718\n116\t0.396239\n120\t0.001136\n121\t0.032375\n122\t0.007242\n123\t0.027831\n124\t0.013561\n125\t0.150728\n126\t0.114094\n127\t0.07966\n129\t2.578359\n130\t0.256231\n132\t0.005254\n135\t0.102876\n136\t0.03486\n137\t0.071424\n138\t0.021157\n139\t0.314024\n140\t0.065886\n141\t2.280949\n142\t2.305443\n143\t7.497659\n144\t0.656233\n145\t0.026056\n148\t0.005112\n152\t0.034576\n153\t0.069223\n154\t0.035073\n155\t2.668384\n156\t0.291446\n157\t1.242179\n158\t0.131985\n161\t0.008875\n163\t0.018956\n167\t0.000213\n169\t0.00923\n170\t0.000142\n171\t0.011928\n172\t0.001704\n174\t0.002556\n175\t0.000781\n182\t0.003053\n184\t0.000284\n185\t0.008023\n186\t0.458362\n187\t0.050195\n188\t0.004189\n191\t0.000142\n192\t0.000781\n195\t0.000426\n203\t0.000284\n209\t0.00355\n212\t0.000284\n214\t0.000497\n219\t0.000213\n231\t0.000142\n233\t0.000142\n234\t0.000781\n246\t7.1E-05\n249\t0.00284\n250\t0.00142\n251\t0.000355\n257\t0.000639\n263\t0.000639\n266\t0.000213\n270\t0.000142\n283\t0.000284\n295\t0.000568\n297\t0.000355\n314\t0.000213\n315\t0.000142\n321\t0.000426\n327\t0.001207\n329\t0.000994\n342\t0.001633\n348\t0.000355\n380\t0.000142\n390\t0.000497\n398\t0.000213\n401\t0.006674\n402\t0.001775\n403\t0.000923\n427\t0.00071\n455\t0.000213\n468\t0.000355\n474\t0.00071\n495\t0.000213\n496\t7.1E-05\n497\t0.000355\n500\t0.000497\n```","hint_text":null,"created_at":"2025-06-13T09:27:11Z","closed_at":"2025-06-13T09:27:11Z","version":"0.4.3","FAIL_TO_PASS":[],"PASS_TO_PASS":["tests\/importing\/test_load_from_msp.py::test_load_from_msp_diverse_spectrum_collection","tests\/importing\/test_load_from_msp.py::test_load_from_msp_spaces_massbank_1","tests\/importing\/test_load_from_msp.py::test_parse_metadata[comments: SMILES=\"CC(O)C(O)=O\"-expected_output1]","tests\/importing\/test_load_from_msp.py::test_load_msp_with_scientific_notation","tests\/importing\/test_load_from_msp.py::test_get_peak_values[496\\t7.1e-05-expected1]","tests\/importing\/test_load_from_msp.py::test_parse_metadata[comments: mass=12.0-expected_output2]","tests\/importing\/test_load_from_msp.py::test_parse_metadata[name: 3,4-DICHLOROPHENOL-expected_output3]","tests\/importing\/test_load_from_msp.py::test_get_peak_values[85:201 86:55 87:10 88:4 89:315-expected2]","tests\/importing\/test_load_from_msp.py::test_load_from_msp_multiline","tests\/importing\/test_load_from_msp.py::test_load_from_msp_spaces_mona_1","tests\/importing\/test_load_from_msp.py::test_load_from_msp_spaces_mona_2","tests\/importing\/test_load_from_msp.py::test_load_golm_style_msp","tests\/importing\/test_load_from_msp.py::test_parse_metadata[comments: \"DB#=JP000001\"-expected_output5]","tests\/importing\/test_load_from_msp.py::test_load_msl","tests\/importing\/test_load_from_msp.py::test_load_msp_with_comments_including_quotes","tests\/importing\/test_load_from_msp.py::test_parse_metadata[comments: \"SMILES=\"-expected_output0]","tests\/importing\/test_load_from_msp.py::test_load_from_msp_tabs","tests\/importing\/test_load_from_msp.py::test_get_peak_values[496\\t7.1E-05-expected0]","tests\/importing\/test_load_from_msp.py::test_parse_metadata[comments: \"SMILES=CC(O)C(O)=O\"-expected_output4]"],"environment_setup_commit":null,"command_build":"pip install -e .;\npip install pytest pytest-json-report;","command_test":"pytest --json-report --json-report-file=report_pytest.json","image_name":"python:3.11","meta":null,"command_test_small":"pytest --json-report --json-report-file=report_pytest.json tests\/importing\/test_load_from_msp.py","timeout_build":3000,"timeout_test":600,"gold_patch":"diff --git a\/matchms\/importing\/load_from_msp.py b\/matchms\/importing\/load_from_msp.py\nindex cf7726a4..47dbedcc 100644\n--- a\/matchms\/importing\/load_from_msp.py\n+++ b\/matchms\/importing\/load_from_msp.py\n@@ -109,7 +109,7 @@ def _parse_line_with_peaks(rline: str) -> Tuple[List[float], List[float], str]:\n \n def get_peak_values(peak: str) -> Tuple[List[float], List[float]]:\n \"\"\"Get the m\/z and intensity value from the line containing the peak information.\"\"\"\n- tokens = re.findall(r\"(\\d+(?:\\.\\d+)?(?:e[-+]?\\d+)?)\", peak)\n+ tokens = re.findall(r\"(\\d+(?:\\.\\d+)?(?:[eE][-+]?\\d+)?)\", peak)\n if len(tokens) % 2 != 0:\n raise RuntimeError(\"Wrong peak format detected!\")\n \n"} {"repo":"DataDog\/guarddog","instance_id":"guarddog-4","base_commit":"4d8b7972885ce111991af01610b24b326dcc1de8","patch":"","test_patch":"diff --git a\/tests\/analyzer\/metadata\/test_bundled_binary.py b\/tests\/analyzer\/metadata\/test_bundled_binary.py\nindex 07f1845..7a01283 100644\n--- a\/tests\/analyzer\/metadata\/test_bundled_binary.py\n+++ b\/tests\/analyzer\/metadata\/test_bundled_binary.py\n@@ -19,6 +19,8 @@ class TestBundleBinary:\n binary_sample_elf = (\n b\"\\x7F\\x45\\x4C\\x46\" + b\"0x90\" * 10\n ) # elf magic number plus nop sled\n+ binary_sample_macho32 = b\"\\xFE\\xED\\xFA\\xCE\" + b\"0x90\" * 10\n+ binary_sample_macho64 = b\"\\xFE\\xED\\xFA\\xCF\" + b\"0x90\" * 10\n \n @pytest.mark.parametrize(\n \"detector\",\n@@ -52,6 +54,38 @@ class TestBundleBinary:\n matches, _ = detector.detect({}, dir)\n assert matches\n \n+ @pytest.mark.parametrize(\n+ \"detector\",\n+ [\n+ (pypi_detector),\n+ (npm_detector),\n+ ],\n+ )\n+ def test_macho32(self, detector: BundledBinary):\n+ with tempfile.TemporaryDirectory() as dir:\n+ full_path = os.path.join(dir, \"package\")\n+ os.mkdir(full_path)\n+ with open(os.path.join(full_path, \"linux.txt\"), \"wb\") as f:\n+ f.write(self.binary_sample_macho32)\n+ matches, _ = detector.detect({}, dir)\n+ assert matches\n+\n+ @pytest.mark.parametrize(\n+ \"detector\",\n+ [\n+ (pypi_detector),\n+ (npm_detector),\n+ ],\n+ )\n+ def test_macho64(self, detector: BundledBinary):\n+ with tempfile.TemporaryDirectory() as dir:\n+ full_path = os.path.join(dir, \"package\")\n+ os.mkdir(full_path)\n+ with open(os.path.join(full_path, \"linux.txt\"), \"wb\") as f:\n+ f.write(self.binary_sample_macho64)\n+ matches, _ = detector.detect({}, dir)\n+ assert matches\n+\n @pytest.mark.parametrize(\n \"detector\",\n [\n","problem_statement":"Add Mach-O magic bytes to the bundled binary detector\nThe [bundled binary detector](https:\/\/github.com\/DataDog\/guarddog\/blob\/v2.1.0\/guarddog\/analyzer\/metadata\/bundled_binary.py#L17) currently detects **ELF** (Unix) and **exe** (Windows) files, but it does not account for the magic bytes for **Mach-O** (Mac) files. This could lead to malicious packages targeting Macs to go unnoticed.\n\nFor reference:\n\n\n\nSee https:\/\/en.wikipedia.org\/wiki\/Mach-O#Mach-O_header for more info.","hint_text":null,"created_at":"2025-01-22T12:07:10Z","closed_at":"2025-01-22T12:07:10Z","version":"0.4.3","FAIL_TO_PASS":[],"PASS_TO_PASS":["tests\/analyzer\/metadata\/test_bundled_binary.py::TestBundleBinary::test_plain[detector1]","tests\/analyzer\/metadata\/test_bundled_binary.py::TestBundleBinary::test_empty[detector1]","tests\/analyzer\/metadata\/test_bundled_binary.py::TestBundleBinary::test_macho64[detector0]","tests\/analyzer\/metadata\/test_bundled_binary.py::TestBundleBinary::test_empty[detector0]","tests\/analyzer\/metadata\/test_bundled_binary.py::TestBundleBinary::test_macho64[detector1]","tests\/analyzer\/metadata\/test_bundled_binary.py::TestBundleBinary::test_exe[detector1]","tests\/analyzer\/metadata\/test_bundled_binary.py::TestBundleBinary::test_macho32[detector0]","tests\/analyzer\/metadata\/test_bundled_binary.py::TestBundleBinary::test_exe[detector0]","tests\/analyzer\/metadata\/test_bundled_binary.py::TestBundleBinary::test_plain[detector0]","tests\/analyzer\/metadata\/test_bundled_binary.py::TestBundleBinary::test_elf[detector1]","tests\/analyzer\/metadata\/test_bundled_binary.py::TestBundleBinary::test_macho32[detector1]","tests\/analyzer\/metadata\/test_bundled_binary.py::TestBundleBinary::test_multiplebinaries[detector0]","tests\/analyzer\/metadata\/test_bundled_binary.py::TestBundleBinary::test_multiplebinaries[detector1]","tests\/analyzer\/metadata\/test_bundled_binary.py::TestBundleBinary::test_elf[detector0]"],"environment_setup_commit":null,"command_build":"pip install -e .;\npip install pytest pytest-json-report;","command_test":"pytest --json-report --json-report-file=report_pytest.json","image_name":"python:3.11","meta":null,"command_test_small":"pytest --json-report --json-report-file=report_pytest.json tests\/analyzer\/metadata\/test_bundled_binary.py","timeout_build":3000,"timeout_test":600,"gold_patch":"diff --git a\/guarddog\/analyzer\/metadata\/bundled_binary.py b\/guarddog\/analyzer\/metadata\/bundled_binary.py\nindex 5b6e875..81ed040 100644\n--- a\/guarddog\/analyzer\/metadata\/bundled_binary.py\n+++ b\/guarddog\/analyzer\/metadata\/bundled_binary.py\n@@ -14,7 +14,12 @@ class BundledBinary(Detector):\n \n # magic bytes are the first few bytes of a file that can be used to identify the file type\n # regardless of their extension\n- magic_bytes = {\"exe\": b\"\\x4D\\x5A\", \"elf\": b\"\\x7F\\x45\\x4C\\x46\"}\n+ magic_bytes = {\n+ \"exe\": b\"\\x4D\\x5A\",\n+ \"elf\": b\"\\x7F\\x45\\x4C\\x46\",\n+ \"macho32\": b\"\\xFE\\xED\\xFA\\xCE\",\n+ \"macho64\": b\"\\xFE\\xED\\xFA\\xCF\",\n+ }\n \n def __init__(self):\n super().__init__(\n"} {"repo":"mitmproxy\/pdoc","instance_id":"pdoc-5","base_commit":"ea2b69a4162226b07f68cd25d92d4d92dbbafaf8","patch":"","test_patch":"diff --git a\/test\/test_render_helpers.py b\/test\/test_render_helpers.py\nindex c17740f..4279725 100644\n--- a\/test\/test_render_helpers.py\n+++ b\/test\/test_render_helpers.py\n@@ -110,6 +110,22 @@ def test_markdown_toc():\n assert to_html(\"#foo\\n#bar\").toc_html # type: ignore\n \n \n+def test_mixed_toc():\n+ \"\"\"\n+ markdown2 can handle mixed markdown and HTML headings.\n+\n+ Let's test that this works as expected.\n+ \"\"\"\n+ expected = [\n+ \"
See https:\/\/www.python.org<\/a>.<\/p>\\n]","test\/test_render_helpers.py::test_qualname_candidates[foo-candidates1]","test\/test_render_helpers.py::test_relative_link[foo.bar-foo.bar.baz-bar\/baz.html]","test\/test_render_helpers.py::test_markdown_autolink[https:\/\/example.com\/- https:\/\/example.com\/<\/a><\/p>\\n]","test\/test_render_helpers.py::test_edit_url[demo-True-mapping2-https:\/\/github.com\/mhils\/pdoc\/blob\/master\/test\/testdata\/demo\/__init__.py]","test\/test_render_helpers.py::test_edit_url[demo-False-mapping0-None]","test\/test_render_helpers.py::test_split_identifier[all_modules1-a.c.b.d-result1]","test\/test_render_helpers.py::test_possible_sources[all_modules1-a.b-result1]","test\/test_render_helpers.py::test_relative_link[foo.foo-foo-..\/foo.html]","test\/test_render_helpers.py::test_relative_link[foo.bar.baz-foo.qux.quux-..\/qux\/quux.html]","test\/test_render_helpers.py::test_markdown_toc","test\/test_render_helpers.py::test_relative_link[foo-bar-bar.html]","test\/test_render_helpers.py::test_module_candidates[foo.bar.baz-foo-candidates2]","test\/test_render_helpers.py::test_qualname_candidates[-candidates0]","test\/test_render_helpers.py::test_split_identifier[all_modules0-a.b.c.d-result0]","test\/test_render_helpers.py::test_possible_sources[all_modules0-a.B-result0]","test\/test_render_helpers.py::test_markdown_autolink[See **https:\/\/www.python.org**.- See https:\/\/www.python.org<\/strong>.<\/p>\\n]","test\/test_render_helpers.py::test_possible_sources[all_modules3-a.b.c.d-result3]","test\/test_render_helpers.py::test_markdown_autolink[See the [Python home page ](https:\/\/www.python.org) for info.- See the Python home page <\/a> for info.<\/p>\\n]","test\/test_render_helpers.py::test_qualname_candidates[foo.bar-candidates2]","test\/test_render_helpers.py::test_markdown_autolink[link<\/a>- link<\/a><\/p>\\n]","test\/test_render_helpers.py::test_module_candidates[foo.bar.baz-qux-candidates0]","test\/test_render_helpers.py::test_markdown_autolink[