summaryrefslogtreecommitdiff
path: root/Lib/test/test_compile.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2017-01-24 20:54:07 +0200
committerSerhiy Storchaka <storchaka@gmail.com>2017-01-24 20:54:07 +0200
commit067cbd02bf2d9dba35fb73edc57afecc759411fd (patch)
tree7453e06dcfe548561a3123139f3cc963bfac18cd /Lib/test/test_compile.py
parentc3858bd7c6e6ef37978b8483a9fe594f29b4b2de (diff)
parent4102d25b7eef868519b4c9b398690313cd36ef66 (diff)
downloadcpython-git-067cbd02bf2d9dba35fb73edc57afecc759411fd.tar.gz
Issue #29337: Fixed possible BytesWarning when compare the code objects.
Warnings could be emitted at compile time.
Diffstat (limited to 'Lib/test/test_compile.py')
-rw-r--r--Lib/test/test_compile.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_compile.py b/Lib/test/test_compile.py
index 4a7230f671..b4a52a5310 100644
--- a/Lib/test/test_compile.py
+++ b/Lib/test/test_compile.py
@@ -630,6 +630,7 @@ if 1:
f1 = ns['f1']
f2 = ns['f2']
self.assertIsNot(f1.__code__, f2.__code__)
+ self.assertNotEqual(f1.__code__, f2.__code__)
self.check_constant(f1, const1)
self.check_constant(f2, const2)
self.assertEqual(repr(f1()), repr(const1))
@@ -638,6 +639,8 @@ if 1:
check_different_constants(0, 0.0)
check_different_constants(+0.0, -0.0)
check_different_constants((0,), (0.0,))
+ check_different_constants('a', b'a')
+ check_different_constants(('a',), (b'a',))
# check_different_constants() cannot be used because repr(-0j) is
# '(-0-0j)', but when '(-0-0j)' is evaluated to 0j: we loose the sign.