mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-07-26 13:47:40 +00:00
cleanup
This commit is contained in:
+1
-11
@@ -33,16 +33,6 @@ def natural_key(string_):
|
|||||||
return [int(s) if s.isdigit() else s for s in re.split(r'(\d+)', string_)]
|
return [int(s) if s.isdigit() else s for s in re.split(r'(\d+)', string_)]
|
||||||
|
|
||||||
|
|
||||||
def walk_modules(package):
|
|
||||||
yield importlib.import_module(package)
|
|
||||||
for name in sorted(glob.glob(package + "/*.py"), key=natural_key):
|
|
||||||
name = os.path.splitext(os.path.basename(name))[0]
|
|
||||||
if name == "__init__":
|
|
||||||
continue
|
|
||||||
|
|
||||||
yield importlib.import_module(package + "." + name)
|
|
||||||
|
|
||||||
|
|
||||||
class TestStdout:
|
class TestStdout:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.output = []
|
self.output = []
|
||||||
@@ -112,7 +102,7 @@ def run(include_long_tests=False, capture_results=False, tests=None, filters=Non
|
|||||||
if not matches:
|
if not matches:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
orig_stdout.write(colored("%s: %s ... ", color="yellow", attrs=["bold"]) % (test, o.__name__))
|
orig_stdout.write("%s: %s ... " % (test, colored(o.__name__, color="yellow", attrs=["bold"])))
|
||||||
orig_stdout.flush()
|
orig_stdout.flush()
|
||||||
|
|
||||||
t = o()
|
t = o()
|
||||||
|
|||||||
Reference in New Issue
Block a user