summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2010-11-09 01:11:31 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2010-11-09 01:11:31 (GMT)
commit92665ab8c7aa6bcf393fc53ea7227b7768d3bb8b (patch)
treec168e4cb77373b165d78edbd89a41a3e6215aa81 /Lib
parent58c0752a33253641c1423fac2d4ef3f623fbcb46 (diff)
downloadcpython-92665ab8c7aa6bcf393fc53ea7227b7768d3bb8b.zip
cpython-92665ab8c7aa6bcf393fc53ea7227b7768d3bb8b.tar.gz
cpython-92665ab8c7aa6bcf393fc53ea7227b7768d3bb8b.tar.bz2
test_tokenize: use self.assertEqual() instead of plain assert
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_tokenize.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_tokenize.py b/Lib/test/test_tokenize.py
index f98efcb..da2138a 100644
--- a/Lib/test/test_tokenize.py
+++ b/Lib/test/test_tokenize.py
@@ -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):