Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6179fe6

Browse files
committed
Don't us sys.ps1 and sys.ps2.
Exercise trailing comma in tuples.
1 parent fac38b7 commit 6179fe6

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

Lib/test/testall.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def g2(): return 1
122122
[4]
123123
from math import *
124124
[5]
125-
from sys import modules, ps1, ps2
125+
from sys import modules, path
126126
[6]
127127

128128
### compound_stmt: if_stmt | while_stmt | for_stmt | try_stmt | funcdef | classdef
@@ -213,7 +213,7 @@ def g2(): return 1
213213
x = +1
214214
x = -1
215215
x = 1
216-
c = sys.ps1[0]
216+
c = sys.path[0]
217217
x = time.time()
218218
x = sys.modules['time'].time()
219219
a = '01234'
@@ -243,7 +243,11 @@ def g2(): return 1
243243

244244
### exprlist: expr (',' expr)* [',']
245245
### testlist: test (',' test)* [',']
246-
# These have been exercised enough above
246+
# These have been exercised already above, except for trailing comma:
247+
x = 1, 2, 3,
248+
x = 1,
249+
x = (1 and 2, 1 or 2,)
250+
x = (not 1,)
247251

248252
print 'classdef' # 'class' NAME parameters ['=' baselist] ':' suite
249253
### baselist: atom arguments (',' atom arguments)*

0 commit comments

Comments
 (0)