Commit 4b5ecb7f authored by Stefan Behnel's avatar Stefan Behnel

cleanups in test runner

--HG--
extra : rebase_source : 0c6236abf15330b12721c83937bdc07f495d52f0
parent 695f906c
...@@ -5,7 +5,6 @@ import sys ...@@ -5,7 +5,6 @@ import sys
import re import re
import gc import gc
import locale import locale
import codecs
import shutil import shutil
import time import time
import unittest import unittest
...@@ -975,7 +974,7 @@ def collect_doctests(path, module_prefix, suite, selectors): ...@@ -975,7 +974,7 @@ def collect_doctests(path, module_prefix, suite, selectors):
'#' in filename and not '#' in filename and not
filename.startswith('.') and not filename.startswith('.') and not
filename in blacklist) filename in blacklist)
import doctest, types import doctest
for dirpath, dirnames, filenames in os.walk(path): for dirpath, dirnames, filenames in os.walk(path):
for dir in list(dirnames): for dir in list(dirnames):
if not package_matches(dir): if not package_matches(dir):
...@@ -1269,8 +1268,8 @@ def get_version(): ...@@ -1269,8 +1268,8 @@ def get_version():
full_version = cython_version full_version = cython_version
top = os.path.dirname(os.path.abspath(__file__)) top = os.path.dirname(os.path.abspath(__file__))
if os.path.exists(os.path.join(top, '.git')): if os.path.exists(os.path.join(top, '.git')):
try:
old_dir = os.getcwd() old_dir = os.getcwd()
try:
os.chdir(top) os.chdir(top)
head_commit = subprocess_output(['git', 'rev-parse', 'HEAD']).strip() head_commit = subprocess_output(['git', 'rev-parse', 'HEAD']).strip()
version_commit = subprocess_output(['git', 'rev-parse', cython_version]).strip() version_commit = subprocess_output(['git', 'rev-parse', cython_version]).strip()
...@@ -1481,7 +1480,6 @@ def main(): ...@@ -1481,7 +1480,6 @@ def main():
if selector.startswith('bugs'): if selector.startswith('bugs'):
test_bugs = True test_bugs = True
import re
selectors = [ string_selector(r) for r in cmd_args ] selectors = [ string_selector(r) for r in cmd_args ]
if not selectors: if not selectors:
selectors = [ lambda x, tags=None: True ] selectors = [ lambda x, tags=None: True ]
......
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