diff options
author | Florent Xicluna <florent.xicluna@gmail.com> | 2013-02-24 13:07:53 +0100 |
---|---|---|
committer | Florent Xicluna <florent.xicluna@gmail.com> | 2013-02-24 13:07:53 +0100 |
commit | 72269ddfebfbe7075079b224df30c7c989aa7281 (patch) | |
tree | 55f0482f7e891f9420d3c34a65d5a31365a7de06 /testsuite/E22.py | |
parent | 2a82c7eb2afac5ef340a509b6b72acea13c36fa6 (diff) | |
download | pep8-72269ddfebfbe7075079b224df30c7c989aa7281.tar.gz |
Report E227 or E228 instead of E225 for whitespace around bitwise, shift or modulo operators; issue #166
Diffstat (limited to 'testsuite/E22.py')
-rw-r--r-- | testsuite/E22.py | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/testsuite/E22.py b/testsuite/E22.py index 36e028e..ba93d41 100644 --- a/testsuite/E22.py +++ b/testsuite/E22.py @@ -53,10 +53,14 @@ submitted+= 1 #: E225 c =-1 #: E225 +x = x /2 - 1 +#: E225 c = alpha -4 #: E225 c = alpha- 4 #: E225 +z = x **y +#: E225 z = (x + 1) **y #: E225 z = (x + 1)** y @@ -79,6 +83,9 @@ c = (a +b)*(a - b) #: E225 E226 c = (a+ b)*(a - b) #: + +#: E226 +z = 2**30 #: E226 c = (a+b) * (a-b) #: E226 @@ -86,13 +93,32 @@ norman = True+False #: E226 x = x*2 - 1 #: E226 +x = x/2 - 1 +#: E226 hypot2 = x*x + y*y #: E226 c = (a + b)*(a - b) #: E226 def squares(n): return (i**2 for i in range(n)) +#: E227 +_1kB = _1MB>>10 +#: E227 +_1MB = _1kB<<10 +#: E227 +a = b|c +#: E227 +b = c&a +#: E227 +c = b^a +#: E228 +a = b%c +#: E228 +msg = fmt%(errno, errmsg) +#: E228 +msg = "Error %d occured"%errno #: + #: Okay i = i + 1 submitted += 1 @@ -110,8 +136,10 @@ lambda a, b=h[:], c=0: (a, b, c) if not -5 < x < +5: print >>sys.stderr, "x is out of range." print >> sys.stdout, "x is an integer." +z = 2 ** 30 +x = x / 2 - 1 -if True: +if alpha[:-i]: *a, b = (1, 2, 3) |