Skip to content

Commit

Permalink
Add acceptance test for WPS125 (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavel Vergeev authored and sobolevn committed May 28, 2018
1 parent 5d57fb2 commit ad24a78
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/fixtures/wrong_variable.py
Expand Up @@ -43,10 +43,12 @@ class Fixture(object):

def __init__(self, value): # error here
self.var = value # error here only for `var`, not for `value`
self.x = value # error here only for `x`, not for `value`


val = Fixture() # error here
print(val.var) # no error here
print(val.x) # no error here

if val:
__author__ = 'John' # no error here since it's a rare use of module meta
1 change: 1 addition & 0 deletions tests/test_checkers/test_wrong_variable.py
Expand Up @@ -18,4 +18,5 @@ def test_wrong_variables_in_fixture(absolute_path):
assert stdout.count(b'WPS122') == 3
assert stdout.count(b'WPS123') == 2
assert stdout.count(b'WPS124') == 1
assert stdout.count(b'WPS125') == 1
assert stdout.count(b'WPS126') == 1

0 comments on commit ad24a78

Please sign in to comment.