Issue #19592: Use specific asserts in lib2to3 tests.

This commit is contained in:
Serhiy Storchaka 2013-11-14 23:49:58 +02:00
parent 98a0d063a1
commit 8bdc130121
5 changed files with 17 additions and 17 deletions

View file

@ -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: