summaryrefslogtreecommitdiff
path: root/tests/test_phystokens.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_phystokens.py')
-rw-r--r--tests/test_phystokens.py11
1 files changed, 3 insertions, 8 deletions
diff --git a/tests/test_phystokens.py b/tests/test_phystokens.py
index c1e51f1c..9ff053c4 100644
--- a/tests/test_phystokens.py
+++ b/tests/test_phystokens.py
@@ -29,7 +29,7 @@ class PhysTokensTest(CoverageTest):
"""Tokenize `source`, then put it back together, should be the same."""
tokenized = ""
for line in source_token_lines(source):
- text = "".join([t for _,t in line])
+ text = "".join(t for _, t in line)
tokenized += text + "\n"
# source_token_lines doesn't preserve trailing spaces, so trim all that
# before comparing.
@@ -86,11 +86,6 @@ if sys.version_info < (3, 0):
run_in_temp_dir = False
- if sys.version_info >= (2,4):
- default_encoding = 'ascii'
- else:
- default_encoding = 'iso-8859-1'
-
def test_detect_source_encoding(self):
# Various forms from http://www.python.org/dev/peps/pep-0263/
source = "# coding=cp850\n\n"
@@ -110,11 +105,11 @@ if sys.version_info < (3, 0):
def test_dont_detect_source_encoding_on_third_line(self):
# A coding declaration doesn't count on the third line.
source = "\n\n# coding=cp850\n\n"
- self.assertEqual(source_encoding(source), self.default_encoding)
+ self.assertEqual(source_encoding(source), 'ascii')
def test_detect_source_encoding_of_empty_file(self):
# An important edge case.
- self.assertEqual(source_encoding(""), self.default_encoding)
+ self.assertEqual(source_encoding(""), 'ascii')
def test_bom(self):
# A BOM means utf-8.