Skip to content

Commit

Permalink
mark xfail
Browse files Browse the repository at this point in the history
  • Loading branch information
Carreau committed Nov 22, 2023
1 parent 5da0cb5 commit c57cb90
Showing 1 changed file with 26 additions and 4 deletions.
30 changes: 26 additions & 4 deletions tests/test_autoimp.py
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,9 @@ class B:
assert unused == []


@pytest.mark.xfail(
reason="Had to deactivate as part of https://github.com/deshaw/pyflyby/pull/269/files conflicting requirements"
)
def test_find_missing_imports_class_name_1():
code = dedent(
"""
Expand All @@ -547,10 +550,29 @@ class Chippewa:
Bobtail # will be name error at runtime
Rockton = Passall, Corinne, Chippewa
# ^error, ^ok , ^ok
""")
result = find_missing_imports(code, [{}])
result = _dilist2strlist(result)
expected = ['Bobtail', 'Passall']
"""
)
result = find_missing_imports(code, [{}])
result = _dilist2strlist(result)
expected = ["Bobtail", "Passall"]
assert expected == result


def test_find_missing_imports_class_name_1b():
code = dedent(
"""
class Corinne:
pass
class Bobtail:
class Chippewa:
Bobtail # will be name error at runtime
Rockton = Passall, Corinne, Chippewa
# ^error, ^ok , ^ok
"""
)
result = find_missing_imports(code, [{}])
result = _dilist2strlist(result)
expected = ["Passall"]
assert expected == result


Expand Down

0 comments on commit c57cb90

Please sign in to comment.