summaryrefslogtreecommitdiffstats
path: root/Lib/lib2to3/tests/test_parser.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2013-11-14 21:49:58 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2013-11-14 21:49:58 (GMT)
commit8bdc130121550fa99d7e76c84a06deda21000cd4 (patch)
tree8aa47df57969d9ade01d4c858241481844901363 /Lib/lib2to3/tests/test_parser.py
parent98a0d063a12c94ac9db6b1076cddad40a2fbd82b (diff)
downloadcpython-8bdc130121550fa99d7e76c84a06deda21000cd4.zip
cpython-8bdc130121550fa99d7e76c84a06deda21000cd4.tar.gz
cpython-8bdc130121550fa99d7e76c84a06deda21000cd4.tar.bz2
Issue #19592: Use specific asserts in lib2to3 tests.
Diffstat (limited to 'Lib/lib2to3/tests/test_parser.py')
-rw-r--r--Lib/lib2to3/tests/test_parser.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/lib2to3/tests/test_parser.py b/Lib/lib2to3/tests/test_parser.py
index 09b439a..a383a14 100644
--- a/Lib/lib2to3/tests/test_parser.py
+++ b/Lib/lib2to3/tests/test_parser.py
@@ -168,8 +168,8 @@ class TestParserIdempotency(support.TestCase):
for filepath in support.all_project_files():
with open(filepath, "rb") as fp:
encoding = tokenize.detect_encoding(fp.readline)[0]
- self.assertTrue(encoding is not None,
- "can't detect encoding for %s" % filepath)
+ self.assertIsNotNone(encoding,
+ "can't detect encoding for %s" % filepath)
with open(filepath, "r", encoding=encoding) as fp:
source = fp.read()
try: