There was an error while loading. Please reload this page.
1 parent c3f52b4 commit 5a31080Copy full SHA for 5a31080
Lib/test/test_capi.py
@@ -635,11 +635,11 @@ def callback():
635
#unsuccessful.
636
while True:
637
if _testcapi._pending_threadfunc(callback):
638
- break;
+ break
639
640
def pendingcalls_wait(self, l, n, context = None):
641
#now, stick around until l[0] has grown to 10
642
- count = 0;
+ count = 0
643
while len(l) != n:
644
#this busy loop is where we expect to be interrupted to
645
#run our callbacks. Note that callbacks are only run on the
Lib/test/test_codeop.py
@@ -182,21 +182,21 @@ def test_incomplete(self):
182
ai("from a import (b,c")
183
ai("from a import (b,c,")
184
185
- ai("[");
186
- ai("[a");
187
- ai("[a,");
188
- ai("[a,b");
189
- ai("[a,b,");
190
-
191
- ai("{");
192
- ai("{a");
193
- ai("{a:");
194
- ai("{a:b");
195
- ai("{a:b,");
196
- ai("{a:b,c");
197
- ai("{a:b,c:");
198
- ai("{a:b,c:d");
199
- ai("{a:b,c:d,");
+ ai("[")
+ ai("[a")
+ ai("[a,")
+ ai("[a,b")
+ ai("[a,b,")
+
+ ai("{")
+ ai("{a")
+ ai("{a:")
+ ai("{a:b")
+ ai("{a:b,")
+ ai("{a:b,c")
+ ai("{a:b,c:")
+ ai("{a:b,c:d")
+ ai("{a:b,c:d,")
200
201
ai("a(")
202
ai("a(b")
Lib/test/test_csv.py
@@ -157,7 +157,7 @@ def test_write_arg_valid(self):
157
self._write_error_test(OSError, BadIterable())
158
class BadList:
159
def __len__(self):
160
- return 10;
+ return 10
161
def __getitem__(self, i):
162
if i > 2:
163
raise OSError
Lib/test/test_deque.py
@@ -129,7 +129,8 @@ def __eq__(self, other):
129
self.assertEqual(d.count(None), 16)
130
131
def test_comparisons(self):
132
- d = deque('xabc'); d.popleft()
+ d = deque('xabc')
133
+ d.popleft()
134
for e in [d, deque('abc'), deque('ab'), deque(), list(d)]:
135
self.assertEqual(d==e, type(d)==type(e) and list(d)==list(e))
136
self.assertEqual(d!=e, not(type(d)==type(e) and list(d)==list(e)))
@@ -529,8 +530,8 @@ def test_repr(self):
529
530
self.assertEqual(repr(d)[-20:], '7, 198, 199, [...]])')
531
532
def test_init(self):
- self.assertRaises(TypeError, deque, 'abc', 2, 3);
533
- self.assertRaises(TypeError, deque, 1);
+ self.assertRaises(TypeError, deque, 'abc', 2, 3)
534
+ self.assertRaises(TypeError, deque, 1)
535
536
def test_hash(self):
537
self.assertRaises(TypeError, hash, deque('abc'))
Lib/test/test_float.py
@@ -1184,10 +1184,10 @@ def test_whitespace(self):
1184
1185
1186
def test_from_hex(self):
1187
- MIN = self.MIN;
1188
- MAX = self.MAX;
1189
- TINY = self.TINY;
1190
- EPS = self.EPS;
+ MIN = self.MIN
+ MAX = self.MAX
+ TINY = self.TINY
+ EPS = self.EPS
1191
1192
# two spellings of infinity, with optional signs; case-insensitive
1193
self.identical(fromHex('inf'), INF)
Lib/test/test_heapq.py
@@ -146,11 +146,11 @@ def test_heappushpop(self):
146
self.assertEqual(type(h[0]), int)
147
self.assertEqual(type(x), float)
148
149
- h = [10];
+ h = [10]
150
x = self.module.heappushpop(h, 9)
151
self.assertEqual((h, x), ([10], 9))
152
153
154
x = self.module.heappushpop(h, 11)
155
self.assertEqual((h, x), ([11], 10))
156
Lib/test/test_import/__init__.py
@@ -1086,7 +1086,7 @@ def test_get_sourcefile(self):
1086
# Given a valid bytecode path, return the path to the corresponding
1087
# source file if it exists.
1088
with mock.patch('importlib._bootstrap_external._path_isfile') as _path_isfile:
1089
- _path_isfile.return_value = True;
+ _path_isfile.return_value = True
1090
path = TESTFN + '.pyc'
1091
expect = TESTFN + '.py'
1092
self.assertEqual(_get_sourcefile(path), expect)
@@ -1095,7 +1095,7 @@ def test_get_sourcefile_no_source(self):
1095
# Given a valid bytecode path without a corresponding source path,
1096
# return the original bytecode path.
1097
1098
- _path_isfile.return_value = False;
+ _path_isfile.return_value = False
1099
1100
self.assertEqual(_get_sourcefile(path), path)
1101
Lib/test/test_set.py
@@ -362,8 +362,8 @@ def test_init(self):
362
self.assertEqual(s, set(self.word))
363
s.__init__(self.otherword)
364
self.assertEqual(s, set(self.otherword))
365
- self.assertRaises(TypeError, s.__init__, s, 2);
366
- self.assertRaises(TypeError, s.__init__, 1);
+ self.assertRaises(TypeError, s.__init__, s, 2)
+ self.assertRaises(TypeError, s.__init__, 1)
367
368
def test_constructor_identity(self):
369
s = self.thetype(range(3))
0 commit comments