diff options
author | Florian Bruhin <git@the-compiler.org> | 2015-11-02 18:25:16 +0100 |
---|---|---|
committer | Florian Bruhin <git@the-compiler.org> | 2015-11-02 18:25:16 +0100 |
commit | bb4152d705275b6e6fd207b659f9934bca7036ef (patch) | |
tree | 171c801da93399504f95af6092191261b7af5d6b /tests | |
parent | 144acc9f91842c068bc27cecd48184cfc76d2e9e (diff) | |
download | qutebrowser-bb4152d705275b6e6fd207b659f9934bca7036ef.tar.gz qutebrowser-bb4152d705275b6e6fd207b659f9934bca7036ef.zip |
Add xfail test for vulture bug.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/scripts/test_run_vulture.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/unit/scripts/test_run_vulture.py b/tests/unit/scripts/test_run_vulture.py index cf68b6dad..13cc47e79 100644 --- a/tests/unit/scripts/test_run_vulture.py +++ b/tests/unit/scripts/test_run_vulture.py @@ -138,3 +138,26 @@ def test_unused_method_camelcase(vultdir): Foo() """) 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() |