summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_sys_settrace.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2016-02-08 16:57:02 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2016-02-08 16:57:02 (GMT)
commit51d8c526d5634fa1f0e4976fd357c5423a792082 (patch)
tree5aaa710f4f336f949691c88f70a221169ccc42f8 /Lib/test/test_sys_settrace.py
parentf089196beb0ad8fb262be42eddd92af3f0fe81c1 (diff)
downloadcpython-51d8c526d5634fa1f0e4976fd357c5423a792082.zip
cpython-51d8c526d5634fa1f0e4976fd357c5423a792082.tar.gz
cpython-51d8c526d5634fa1f0e4976fd357c5423a792082.tar.bz2
Replace noop constant statement with expression
* Constant statements will be ignored and the compiler will emit a SyntaxWarning. * Replace constant statement (ex: "1") with an expression statement (ex: "x=1"). * test_traceback: use context manager on the file. Issue #26204.
Diffstat (limited to 'Lib/test/test_sys_settrace.py')
-rw-r--r--Lib/test/test_sys_settrace.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_sys_settrace.py b/Lib/test/test_sys_settrace.py
index ae8f845..bb83623 100644
--- a/Lib/test/test_sys_settrace.py
+++ b/Lib/test/test_sys_settrace.py
@@ -338,8 +338,8 @@ class TraceTestCase(unittest.TestCase):
def test_14_onliner_if(self):
def onliners():
- if True: False
- else: True
+ if True: x=False
+ else: x=True
return 0
self.run_and_compare(
onliners,