Skip to content

tests: more

tests: more #289

GitHub Actions / Test Results failed Dec 1, 2024 in 0s

8 fail, 670 pass in 39m 0s

    3 files  ± 0      3 suites  ±0   39m 0s ⏱️ + 2m 35s
  678 tests + 8    670 ✅ ±0  0 💤 ±0   8 ❌ + 8 
1 992 runs  +24  1 968 ✅ ±0  0 💤 ±0  24 ❌ +24 

Results for commit aa77c08. ± Comparison against earlier commit 62ceb3d.

Annotations

Check warning on line 0 in tests.test_simplifiable_if

See this annotation in the file changed.

@github-actions github-actions / Test Results

All 3 runs failed: test_redundant_condition_part_in_if[cf_b_1139_16.py-expected_output0] (tests.test_simplifiable_if)

artifacts/pytest-3.11-default-default-macos-latest-.xml/pytest.xml [took 0s]
artifacts/pytest-3.11-default-default-ubuntu-latest-.xml/pytest.xml [took 0s]
artifacts/pytest-3.11-default-default-windows-latest-.xml/pytest.xml [took 0s]
Raw output
assert Problem() == Problem(line=11, code="R6218")
  
  Omitting 8 identical items, use -vv to show
  Differing attributes:
  ['line', 'code']
  
  Drill down into differing attribute line:
    line: -1 != 11
  
  Drill down into differing attribute code:
    code: '' != 'R6218'
    - R6218
filename = 'cf_b_1139_16.py', expected_output = [Problem(line=11, code="R6218")]

    @pytest.mark.parametrize("filename,expected_output", [
        ("cf_b_1139_16.py", [lazy_problem().set_line(11).set_code("R6218")]),
        ("ksi_1015_d7fac4e409.py", [lazy_problem().set_line(5).set_code("R6218")]),
        ("ad182172de-sort_nested.py", [lazy_problem().set_line(25).set_code("R6218")]),
        ("8e2e8bd6b3-hw3.py", [lazy_problem().set_line(155).set_code("R6218")]),
        ("273f1b5456-a_minesweeper.py", [lazy_problem().set_code(152).set_code("R6218")]),
        ("39bee13ac5-p3_children.py", [lazy_problem().set_line(26).set_code("R6218")]),
    ])
    def test_redundant_condition_part_in_if(filename: str, expected_output: List[Problem]) -> None:
>       apply_and_lint(
            filename,
            [Arg(Option.PYLINT, "--enable=R6217,R6218,R6219,R6220,R6221")],
            expected_output,
        )

tests/test_simplifiable_if.py:801: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_utils.py:79: in apply_and_lint
    apply_and_lint_multiple([filename], args, expected_output, from_empty)
tests/test_utils.py:88: in apply_and_lint_multiple
    lazy_equal(just_lint(filenames, args, from_empty), expected_output)
tests/test_utils.py:45: in lazy_equal
    lazy_equals(r, e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

received = Problem(), expected = Problem(line=11, code="R6218")

    def lazy_equals(received: Problem, expected: Problem) -> None:
        if not any(expected.has_value(f.name) for f in fields(Problem)):
            assert False, f"unexpected problem {repr(received)}"
    
        copy = replace(received)
        for field in fields(Problem):
            if not expected.has_value(field.name):
                setattr(copy, field.name, getattr(expected, field.name))
    
>       assert copy == expected
E       assert Problem() == Problem(line=11, code="R6218")
E         
E         Omitting 8 identical items, use -vv to show
E         Differing attributes:
E         ['line', 'code']
E         
E         Drill down into differing attribute line:
E           line: -1 != 11
E         
E         Drill down into differing attribute code:
E           code: '' != 'R6218'
E           - R6218

tests/test_utils.py:25: AssertionError

Check warning on line 0 in tests.test_simplifiable_if

See this annotation in the file changed.

@github-actions github-actions / Test Results

All 3 runs failed: test_redundant_condition_part_in_if[ksi_1015_d7fac4e409.py-expected_output1] (tests.test_simplifiable_if)

artifacts/pytest-3.11-default-default-macos-latest-.xml/pytest.xml [took 0s]
artifacts/pytest-3.11-default-default-ubuntu-latest-.xml/pytest.xml [took 0s]
artifacts/pytest-3.11-default-default-windows-latest-.xml/pytest.xml [took 0s]
Raw output
assert Problem() == Problem(line=5, code="R6218")
  
  Omitting 8 identical items, use -vv to show
  Differing attributes:
  ['line', 'code']
  
  Drill down into differing attribute line:
    line: -1 != 5
  
  Drill down into differing attribute code:
    code: '' != 'R6218'
    - R6218
filename = 'ksi_1015_d7fac4e409.py'
expected_output = [Problem(line=5, code="R6218")]

    @pytest.mark.parametrize("filename,expected_output", [
        ("cf_b_1139_16.py", [lazy_problem().set_line(11).set_code("R6218")]),
        ("ksi_1015_d7fac4e409.py", [lazy_problem().set_line(5).set_code("R6218")]),
        ("ad182172de-sort_nested.py", [lazy_problem().set_line(25).set_code("R6218")]),
        ("8e2e8bd6b3-hw3.py", [lazy_problem().set_line(155).set_code("R6218")]),
        ("273f1b5456-a_minesweeper.py", [lazy_problem().set_code(152).set_code("R6218")]),
        ("39bee13ac5-p3_children.py", [lazy_problem().set_line(26).set_code("R6218")]),
    ])
    def test_redundant_condition_part_in_if(filename: str, expected_output: List[Problem]) -> None:
>       apply_and_lint(
            filename,
            [Arg(Option.PYLINT, "--enable=R6217,R6218,R6219,R6220,R6221")],
            expected_output,
        )

tests/test_simplifiable_if.py:801: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_utils.py:79: in apply_and_lint
    apply_and_lint_multiple([filename], args, expected_output, from_empty)
tests/test_utils.py:88: in apply_and_lint_multiple
    lazy_equal(just_lint(filenames, args, from_empty), expected_output)
tests/test_utils.py:45: in lazy_equal
    lazy_equals(r, e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

received = Problem(), expected = Problem(line=5, code="R6218")

    def lazy_equals(received: Problem, expected: Problem) -> None:
        if not any(expected.has_value(f.name) for f in fields(Problem)):
            assert False, f"unexpected problem {repr(received)}"
    
        copy = replace(received)
        for field in fields(Problem):
            if not expected.has_value(field.name):
                setattr(copy, field.name, getattr(expected, field.name))
    
>       assert copy == expected
E       assert Problem() == Problem(line=5, code="R6218")
E         
E         Omitting 8 identical items, use -vv to show
E         Differing attributes:
E         ['line', 'code']
E         
E         Drill down into differing attribute line:
E           line: -1 != 5
E         
E         Drill down into differing attribute code:
E           code: '' != 'R6218'
E           - R6218

tests/test_utils.py:25: AssertionError

Check warning on line 0 in tests.test_simplifiable_if

See this annotation in the file changed.

@github-actions github-actions / Test Results

All 3 runs failed: test_redundant_condition_part_in_if[ad182172de-sort_nested.py-expected_output2] (tests.test_simplifiable_if)

artifacts/pytest-3.11-default-default-macos-latest-.xml/pytest.xml [took 1s]
artifacts/pytest-3.11-default-default-ubuntu-latest-.xml/pytest.xml [took 2s]
artifacts/pytest-3.11-default-default-windows-latest-.xml/pytest.xml [took 1s]
Raw output
assert Problem() == Problem(line=25, code="R6218")
  
  Omitting 8 identical items, use -vv to show
  Differing attributes:
  ['line', 'code']
  
  Drill down into differing attribute line:
    line: -1 != 25
  
  Drill down into differing attribute code:
    code: '' != 'R6218'
    - R6218
filename = 'ad182172de-sort_nested.py'
expected_output = [Problem(line=25, code="R6218")]

    @pytest.mark.parametrize("filename,expected_output", [
        ("cf_b_1139_16.py", [lazy_problem().set_line(11).set_code("R6218")]),
        ("ksi_1015_d7fac4e409.py", [lazy_problem().set_line(5).set_code("R6218")]),
        ("ad182172de-sort_nested.py", [lazy_problem().set_line(25).set_code("R6218")]),
        ("8e2e8bd6b3-hw3.py", [lazy_problem().set_line(155).set_code("R6218")]),
        ("273f1b5456-a_minesweeper.py", [lazy_problem().set_code(152).set_code("R6218")]),
        ("39bee13ac5-p3_children.py", [lazy_problem().set_line(26).set_code("R6218")]),
    ])
    def test_redundant_condition_part_in_if(filename: str, expected_output: List[Problem]) -> None:
>       apply_and_lint(
            filename,
            [Arg(Option.PYLINT, "--enable=R6217,R6218,R6219,R6220,R6221")],
            expected_output,
        )

tests/test_simplifiable_if.py:801: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_utils.py:79: in apply_and_lint
    apply_and_lint_multiple([filename], args, expected_output, from_empty)
tests/test_utils.py:88: in apply_and_lint_multiple
    lazy_equal(just_lint(filenames, args, from_empty), expected_output)
tests/test_utils.py:45: in lazy_equal
    lazy_equals(r, e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

received = Problem(), expected = Problem(line=25, code="R6218")

    def lazy_equals(received: Problem, expected: Problem) -> None:
        if not any(expected.has_value(f.name) for f in fields(Problem)):
            assert False, f"unexpected problem {repr(received)}"
    
        copy = replace(received)
        for field in fields(Problem):
            if not expected.has_value(field.name):
                setattr(copy, field.name, getattr(expected, field.name))
    
>       assert copy == expected
E       assert Problem() == Problem(line=25, code="R6218")
E         
E         Omitting 8 identical items, use -vv to show
E         Differing attributes:
E         ['line', 'code']
E         
E         Drill down into differing attribute line:
E           line: -1 != 25
E         
E         Drill down into differing attribute code:
E           code: '' != 'R6218'
E           - R6218

tests/test_utils.py:25: AssertionError

Check warning on line 0 in tests.test_simplifiable_if

See this annotation in the file changed.

@github-actions github-actions / Test Results

All 3 runs failed: test_redundant_condition_part_in_if[8e2e8bd6b3-hw3.py-expected_output3] (tests.test_simplifiable_if)

artifacts/pytest-3.11-default-default-macos-latest-.xml/pytest.xml [took 6s]
artifacts/pytest-3.11-default-default-ubuntu-latest-.xml/pytest.xml [took 12s]
artifacts/pytest-3.11-default-default-windows-latest-.xml/pytest.xml [took 10s]
Raw output
assert Problem() == Problem(line=... code="R6218")
  
  Omitting 8 identical items, use -vv to show
  Differing attributes:
  ['line', 'code']
  
  Drill down into differing attribute line:
    line: -1 != 155
  
  Drill down into differing attribute code:
    code: '' != 'R6218'
    - R6218
filename = '8e2e8bd6b3-hw3.py'
expected_output = [Problem(line=155, code="R6218")]

    @pytest.mark.parametrize("filename,expected_output", [
        ("cf_b_1139_16.py", [lazy_problem().set_line(11).set_code("R6218")]),
        ("ksi_1015_d7fac4e409.py", [lazy_problem().set_line(5).set_code("R6218")]),
        ("ad182172de-sort_nested.py", [lazy_problem().set_line(25).set_code("R6218")]),
        ("8e2e8bd6b3-hw3.py", [lazy_problem().set_line(155).set_code("R6218")]),
        ("273f1b5456-a_minesweeper.py", [lazy_problem().set_code(152).set_code("R6218")]),
        ("39bee13ac5-p3_children.py", [lazy_problem().set_line(26).set_code("R6218")]),
    ])
    def test_redundant_condition_part_in_if(filename: str, expected_output: List[Problem]) -> None:
>       apply_and_lint(
            filename,
            [Arg(Option.PYLINT, "--enable=R6217,R6218,R6219,R6220,R6221")],
            expected_output,
        )

tests/test_simplifiable_if.py:801: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_utils.py:79: in apply_and_lint
    apply_and_lint_multiple([filename], args, expected_output, from_empty)
tests/test_utils.py:88: in apply_and_lint_multiple
    lazy_equal(just_lint(filenames, args, from_empty), expected_output)
tests/test_utils.py:45: in lazy_equal
    lazy_equals(r, e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

received = Problem(), expected = Problem(line=155, code="R6218")

    def lazy_equals(received: Problem, expected: Problem) -> None:
        if not any(expected.has_value(f.name) for f in fields(Problem)):
            assert False, f"unexpected problem {repr(received)}"
    
        copy = replace(received)
        for field in fields(Problem):
            if not expected.has_value(field.name):
                setattr(copy, field.name, getattr(expected, field.name))
    
>       assert copy == expected
E       assert Problem() == Problem(line=... code="R6218")
E         
E         Omitting 8 identical items, use -vv to show
E         Differing attributes:
E         ['line', 'code']
E         
E         Drill down into differing attribute line:
E           line: -1 != 155
E         
E         Drill down into differing attribute code:
E           code: '' != 'R6218'
E           - R6218

tests/test_utils.py:25: AssertionError

Check warning on line 0 in tests.test_simplifiable_if

See this annotation in the file changed.

@github-actions github-actions / Test Results

All 3 runs failed: test_redundant_condition_part_in_if[273f1b5456-a_minesweeper.py-expected_output4] (tests.test_simplifiable_if)

artifacts/pytest-3.11-default-default-macos-latest-.xml/pytest.xml [took 2s]
artifacts/pytest-3.11-default-default-ubuntu-latest-.xml/pytest.xml [took 4s]
artifacts/pytest-3.11-default-default-windows-latest-.xml/pytest.xml [took 4s]
Raw output
assert Problem() == Problem(code="R6218")
  
  Omitting 9 identical items, use -vv to show
  Differing attributes:
  ['code']
  
  Drill down into differing attribute code:
    code: '' != 'R6218'
    - R6218
filename = '273f1b5456-a_minesweeper.py'
expected_output = [Problem(code="R6218")]

    @pytest.mark.parametrize("filename,expected_output", [
        ("cf_b_1139_16.py", [lazy_problem().set_line(11).set_code("R6218")]),
        ("ksi_1015_d7fac4e409.py", [lazy_problem().set_line(5).set_code("R6218")]),
        ("ad182172de-sort_nested.py", [lazy_problem().set_line(25).set_code("R6218")]),
        ("8e2e8bd6b3-hw3.py", [lazy_problem().set_line(155).set_code("R6218")]),
        ("273f1b5456-a_minesweeper.py", [lazy_problem().set_code(152).set_code("R6218")]),
        ("39bee13ac5-p3_children.py", [lazy_problem().set_line(26).set_code("R6218")]),
    ])
    def test_redundant_condition_part_in_if(filename: str, expected_output: List[Problem]) -> None:
>       apply_and_lint(
            filename,
            [Arg(Option.PYLINT, "--enable=R6217,R6218,R6219,R6220,R6221")],
            expected_output,
        )

tests/test_simplifiable_if.py:801: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_utils.py:79: in apply_and_lint
    apply_and_lint_multiple([filename], args, expected_output, from_empty)
tests/test_utils.py:88: in apply_and_lint_multiple
    lazy_equal(just_lint(filenames, args, from_empty), expected_output)
tests/test_utils.py:45: in lazy_equal
    lazy_equals(r, e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

received = Problem(), expected = Problem(code="R6218")

    def lazy_equals(received: Problem, expected: Problem) -> None:
        if not any(expected.has_value(f.name) for f in fields(Problem)):
            assert False, f"unexpected problem {repr(received)}"
    
        copy = replace(received)
        for field in fields(Problem):
            if not expected.has_value(field.name):
                setattr(copy, field.name, getattr(expected, field.name))
    
>       assert copy == expected
E       assert Problem() == Problem(code="R6218")
E         
E         Omitting 9 identical items, use -vv to show
E         Differing attributes:
E         ['code']
E         
E         Drill down into differing attribute code:
E           code: '' != 'R6218'
E           - R6218

tests/test_utils.py:25: AssertionError

Check warning on line 0 in tests.test_simplifiable_if

See this annotation in the file changed.

@github-actions github-actions / Test Results

All 3 runs failed: test_redundant_condition_part_in_if[39bee13ac5-p3_children.py-expected_output5] (tests.test_simplifiable_if)

artifacts/pytest-3.11-default-default-macos-latest-.xml/pytest.xml [took 0s]
artifacts/pytest-3.11-default-default-ubuntu-latest-.xml/pytest.xml [took 1s]
artifacts/pytest-3.11-default-default-windows-latest-.xml/pytest.xml [took 1s]
Raw output
assert Problem() == Problem(line=26, code="R6218")
  
  Omitting 8 identical items, use -vv to show
  Differing attributes:
  ['line', 'code']
  
  Drill down into differing attribute line:
    line: -1 != 26
  
  Drill down into differing attribute code:
    code: '' != 'R6218'
    - R6218
filename = '39bee13ac5-p3_children.py'
expected_output = [Problem(line=26, code="R6218")]

    @pytest.mark.parametrize("filename,expected_output", [
        ("cf_b_1139_16.py", [lazy_problem().set_line(11).set_code("R6218")]),
        ("ksi_1015_d7fac4e409.py", [lazy_problem().set_line(5).set_code("R6218")]),
        ("ad182172de-sort_nested.py", [lazy_problem().set_line(25).set_code("R6218")]),
        ("8e2e8bd6b3-hw3.py", [lazy_problem().set_line(155).set_code("R6218")]),
        ("273f1b5456-a_minesweeper.py", [lazy_problem().set_code(152).set_code("R6218")]),
        ("39bee13ac5-p3_children.py", [lazy_problem().set_line(26).set_code("R6218")]),
    ])
    def test_redundant_condition_part_in_if(filename: str, expected_output: List[Problem]) -> None:
>       apply_and_lint(
            filename,
            [Arg(Option.PYLINT, "--enable=R6217,R6218,R6219,R6220,R6221")],
            expected_output,
        )

tests/test_simplifiable_if.py:801: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_utils.py:79: in apply_and_lint
    apply_and_lint_multiple([filename], args, expected_output, from_empty)
tests/test_utils.py:88: in apply_and_lint_multiple
    lazy_equal(just_lint(filenames, args, from_empty), expected_output)
tests/test_utils.py:45: in lazy_equal
    lazy_equals(r, e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

received = Problem(), expected = Problem(line=26, code="R6218")

    def lazy_equals(received: Problem, expected: Problem) -> None:
        if not any(expected.has_value(f.name) for f in fields(Problem)):
            assert False, f"unexpected problem {repr(received)}"
    
        copy = replace(received)
        for field in fields(Problem):
            if not expected.has_value(field.name):
                setattr(copy, field.name, getattr(expected, field.name))
    
>       assert copy == expected
E       assert Problem() == Problem(line=26, code="R6218")
E         
E         Omitting 8 identical items, use -vv to show
E         Differing attributes:
E         ['line', 'code']
E         
E         Drill down into differing attribute line:
E           line: -1 != 26
E         
E         Drill down into differing attribute code:
E           code: '' != 'R6218'
E           - R6218

tests/test_utils.py:25: AssertionError

Check warning on line 0 in tests.test_simplifiable_if

See this annotation in the file changed.

@github-actions github-actions / Test Results

All 3 runs failed: test_redundant_condition_part[cf_d_560_24.py-expected_output6] (tests.test_simplifiable_if)

artifacts/pytest-3.11-default-default-macos-latest-.xml/pytest.xml [took 0s]
artifacts/pytest-3.11-default-default-ubuntu-latest-.xml/pytest.xml [took 0s]
artifacts/pytest-3.11-default-default-windows-latest-.xml/pytest.xml [took 0s]
Raw output
AssertionError: unexpected problem Problem(source=pylint, enabled_by="cmd", path="/Users/runner/work/edulint/edulint/tests/data/cf_d_560_24.py", line=7, column=3, code="R6222", text="This condition is always True.", end_line=7, end_column=27, symbol="condition-always-true-or-false")
assert False
filename = 'cf_d_560_24.py', expected_output = []

    @pytest.mark.parametrize("filename,expected_output", [
        ("f267db4b9e-p6_next.py", [
            lazy_problem().set_line(16)
            .set_text("This condition is always True.")
        ]),
        ("uc_3402_02_08.py", [
            lazy_problem().set_line(4)
            .set_text("This condition is always True."),
        ]),
        ("uc_71_1190_11_17.py", [
            lazy_problem().set_line(12)
            .set_text("This 'elif' can be replaced with just 'else'."),
        ]),
        ("ut_98_3740_14_18.py", [
            lazy_problem().set_line(14)
            .set_text("This 'elif' can be replaced with just 'else'."),
        ]),
        ("a12d60edf2-task_4.py", [
            lazy_problem().set_line(60)
            .set_text("This 'elif' can be replaced with just 'else'."),
        ]),
        ("cf_61_b_3.py", []),
        ("cf_d_560_24.py", []),
        ("uc_81_08_13.py", []),
    ])
    def test_redundant_condition_part(filename: str, expected_output: List[Problem]) -> None:
>       apply_and_lint(
            filename,
            [Arg(Option.PYLINT, "--enable=R6216,R6217,R6218,R6219,R6220,R6221,R6222")],
            expected_output,
        )

tests/test_simplifiable_if.py:856: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_utils.py:79: in apply_and_lint
    apply_and_lint_multiple([filename], args, expected_output, from_empty)
tests/test_utils.py:88: in apply_and_lint_multiple
    lazy_equal(just_lint(filenames, args, from_empty), expected_output)
tests/test_utils.py:45: in lazy_equal
    lazy_equals(r, e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

received = Problem(source=pylint, enabled_by="cmd", path="/Users/runner/work/edulint/edulint/tests/data/cf_d_560_24.py", line=7, ...ode="R6222", text="This condition is always True.", end_line=7, end_column=27, symbol="condition-always-true-or-false")
expected = Problem()

    def lazy_equals(received: Problem, expected: Problem) -> None:
        if not any(expected.has_value(f.name) for f in fields(Problem)):
>           assert False, f"unexpected problem {repr(received)}"
E           AssertionError: unexpected problem Problem(source=pylint, enabled_by="cmd", path="/Users/runner/work/edulint/edulint/tests/data/cf_d_560_24.py", line=7, column=3, code="R6222", text="This condition is always True.", end_line=7, end_column=27, symbol="condition-always-true-or-false")
E           assert False

tests/test_utils.py:18: AssertionError

Check warning on line 0 in tests.test_simplifiable_if

See this annotation in the file changed.

@github-actions github-actions / Test Results

All 3 runs failed: test_redundant_condition_part[uc_81_08_13.py-expected_output7] (tests.test_simplifiable_if)

artifacts/pytest-3.11-default-default-macos-latest-.xml/pytest.xml [took 0s]
artifacts/pytest-3.11-default-default-ubuntu-latest-.xml/pytest.xml [took 0s]
artifacts/pytest-3.11-default-default-windows-latest-.xml/pytest.xml [took 0s]
Raw output
AssertionError: unexpected problem Problem(source=pylint, enabled_by="cmd", path="/Users/runner/work/edulint/edulint/tests/data/uc_81_08_13.py", line=5, column=11, code="R6222", text="This condition is always True.", end_line=5, end_column=70, symbol="condition-always-true-or-false")
assert False
filename = 'uc_81_08_13.py', expected_output = []

    @pytest.mark.parametrize("filename,expected_output", [
        ("f267db4b9e-p6_next.py", [
            lazy_problem().set_line(16)
            .set_text("This condition is always True.")
        ]),
        ("uc_3402_02_08.py", [
            lazy_problem().set_line(4)
            .set_text("This condition is always True."),
        ]),
        ("uc_71_1190_11_17.py", [
            lazy_problem().set_line(12)
            .set_text("This 'elif' can be replaced with just 'else'."),
        ]),
        ("ut_98_3740_14_18.py", [
            lazy_problem().set_line(14)
            .set_text("This 'elif' can be replaced with just 'else'."),
        ]),
        ("a12d60edf2-task_4.py", [
            lazy_problem().set_line(60)
            .set_text("This 'elif' can be replaced with just 'else'."),
        ]),
        ("cf_61_b_3.py", []),
        ("cf_d_560_24.py", []),
        ("uc_81_08_13.py", []),
    ])
    def test_redundant_condition_part(filename: str, expected_output: List[Problem]) -> None:
>       apply_and_lint(
            filename,
            [Arg(Option.PYLINT, "--enable=R6216,R6217,R6218,R6219,R6220,R6221,R6222")],
            expected_output,
        )

tests/test_simplifiable_if.py:856: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_utils.py:79: in apply_and_lint
    apply_and_lint_multiple([filename], args, expected_output, from_empty)
tests/test_utils.py:88: in apply_and_lint_multiple
    lazy_equal(just_lint(filenames, args, from_empty), expected_output)
tests/test_utils.py:45: in lazy_equal
    lazy_equals(r, e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

received = Problem(source=pylint, enabled_by="cmd", path="/Users/runner/work/edulint/edulint/tests/data/uc_81_08_13.py", line=5, ...ode="R6222", text="This condition is always True.", end_line=5, end_column=70, symbol="condition-always-true-or-false")
expected = Problem()

    def lazy_equals(received: Problem, expected: Problem) -> None:
        if not any(expected.has_value(f.name) for f in fields(Problem)):
>           assert False, f"unexpected problem {repr(received)}"
E           AssertionError: unexpected problem Problem(source=pylint, enabled_by="cmd", path="/Users/runner/work/edulint/edulint/tests/data/uc_81_08_13.py", line=5, column=11, code="R6222", text="This condition is always True.", end_line=5, end_column=70, symbol="condition-always-true-or-false")
E           assert False

tests/test_utils.py:18: AssertionError