Add xfail test for vulture bug.
This commit is contained in:
parent
144acc9f91
commit
bb4152d705
@ -138,3 +138,26 @@ def test_unused_method_camelcase(vultdir):
|
|||||||
Foo()
|
Foo()
|
||||||
""")
|
""")
|
||||||
assert not vultdir.run()
|
assert not vultdir.run()
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.xfail(
|
||||||
|
True, reason="https://bitbucket.org/jendrikseipp/vulture/issues/10/")
|
||||||
|
def test_globals_bug(vultdir):
|
||||||
|
"""Vulture has a bug where it detects globals as unused.
|
||||||
|
|
||||||
|
When this test starts XPASSing, we know it's been fixed.
|
||||||
|
"""
|
||||||
|
vultdir.makepyfile(foo="""
|
||||||
|
import bar
|
||||||
|
|
||||||
|
bar.attr = True
|
||||||
|
bar.blub()
|
||||||
|
""")
|
||||||
|
vultdir.makepyfile(bar="""
|
||||||
|
attr = False
|
||||||
|
|
||||||
|
def blub():
|
||||||
|
if attr:
|
||||||
|
print("Hey!")
|
||||||
|
""")
|
||||||
|
assert not vultdir.run()
|
||||||
|
Loading…
Reference in New Issue
Block a user