Commit 8a25a77b authored by Stefan Behnel's avatar Stefan Behnel

fix unused imports and Py2.4-isms in test code

parent ac7a5367
...@@ -2,15 +2,14 @@ ...@@ -2,15 +2,14 @@
import os import os
import re import re
import sys import sys
import uuid
import shutil import shutil
import warnings import warnings
import textwrap import textwrap
import unittest import unittest
import tempfile import tempfile
import subprocess import subprocess
import distutils.core #import distutils.core
from distutils import sysconfig #from distutils import sysconfig
from distutils import ccompiler from distutils import ccompiler
import runtests import runtests
...@@ -24,7 +23,7 @@ cfuncs_file = os.path.join(root, 'cfuncs.c') ...@@ -24,7 +23,7 @@ cfuncs_file = os.path.join(root, 'cfuncs.c')
f = open(codefile) f = open(codefile)
try: try:
source_to_lineno = dict((line.strip(), i + 1) for i, line in enumerate(f)) source_to_lineno = dict([ (line.strip(), i + 1) for i, line in enumerate(f) ])
finally: finally:
f.close() f.close()
......
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