Kaydet (Commit) 92665ab8 authored tarafından Victor Stinner's avatar Victor Stinner

test_tokenize: use self.assertEqual() instead of plain assert

üst 58c0752a
No related merge requests found
......@@ -868,15 +868,15 @@ class TestDetectEncoding(TestCase):
print("# coding: %s" % encoding, file=fp)
print("print('euro:\u20ac')", file=fp)
with tokenize_open(filename) as fp:
assert fp.encoding == encoding
assert fp.mode == 'r'
self.assertEqual(fp.encoding, encoding)
self.assertEqual(fp.mode, 'r')
# test BOM (no coding cookie)
with open(filename, 'w', encoding='utf-8-sig') as fp:
print("print('euro:\u20ac')", file=fp)
with tokenize_open(filename) as fp:
assert fp.encoding == 'utf-8-sig'
assert fp.mode == 'r'
self.assertEqual(fp.encoding, 'utf-8-sig')
self.assertEqual(fp.mode, 'r')
class TestTokenize(TestCase):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment