Skip to content

Commit

Permalink
test: added a test for violation WPS357. A raw string must contain th…
Browse files Browse the repository at this point in the history
…e '\' character. If there is no '\' in the string a raw string should not be used.

Closes issue #8
Relates to issue#1081 on the original repository
  • Loading branch information
fwald authored and Mema5 committed Feb 24, 2020
1 parent c02aa31 commit 358f852
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/fixtures/noqa/noqa.py
Expand Up @@ -692,3 +692,5 @@ def consecutive_yields():
'wrong',
]
*numbers, = [4, 7] # noqa: WPS356

unnecessary_raw_string = r'this string does not contain any backlashes.' # noqa: WPS358
4 changes: 4 additions & 0 deletions tests/test_checker/test_noqa.py
Expand Up @@ -163,7 +163,11 @@
'WPS354': 1,
'WPS355': 1,
'WPS356': 1,
<<<<<<< HEAD
'WPS357': 0, # logically unacceptable.
=======
'WPS357': 1,
>>>>>>> test: added a test for violation WPS357. A raw string must contain the '\' character. If there is no '\' in the string a raw string should not be used.

'WPS400': 0, # defined in ignored violations.
'WPS401': 0, # logically unacceptable.
Expand Down

0 comments on commit 358f852

Please sign in to comment.