diff options
Diffstat (limited to 'test/test_misc.py')
-rw-r--r-- | test/test_misc.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/test/test_misc.py b/test/test_misc.py index d2c03c0..a2cba9b 100644 --- a/test/test_misc.py +++ b/test/test_misc.py @@ -15,7 +15,7 @@ """ Tests for the misc checker. """ - +import sys import tempfile import os import contextlib @@ -31,7 +31,11 @@ def create_file_backed_module(code): # because on Windows the file must be closed before writing to it, # see http://bugs.python.org/issue14243 fd, tmp = tempfile.mkstemp() - os.write(fd, code) + if sys.version_info >= (3, 0): + # erff + os.write(fd, bytes(code, 'ascii')) + else: + os.write(fd, code) try: module = test_utils.build_module(code) @@ -53,7 +57,7 @@ class FixmeTest(CheckerTestCase): Message(msg_id='W0511', line=2, args=u'FIXME')): self.checker.process_module(module) - def test_emtpy_fixme_regex(self): + def test_empty_fixme_regex(self): self.checker.config.notes = [] with create_file_backed_module( """a = 1 |