mirror of
https://github.com/python/cpython.git
synced 2025-07-23 11:15:24 +00:00
Issue #19592: Use specific asserts in lib2to3 tests.
This commit is contained in:
parent
98a0d063a1
commit
8bdc130121
5 changed files with 17 additions and 17 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue