|
Carl George |
b213e8e |
diff -Naurp sh-1.12.14.orig/sh.py sh-1.12.14/sh.py
|
|
Carl George |
b213e8e |
--- sh-1.12.14.orig/sh.py 2017-06-06 21:51:42.000000000 -0500
|
|
Carl George |
b213e8e |
+++ sh-1.12.14/sh.py 2017-06-07 08:49:59.350791975 -0500
|
|
Carl George |
b213e8e |
@@ -3519,14 +3519,9 @@ if __name__ == "__main__": # pragma: no
|
|
Carl George |
6644cd9 |
|
|
Carl George |
6644cd9 |
if action in ("test", "travis"):
|
|
Carl George |
6644cd9 |
import test
|
|
Carl George |
6644cd9 |
- coverage = None
|
|
Carl George |
6644cd9 |
- if test.HAS_UNICODE_LITERAL:
|
|
Carl George |
6644cd9 |
- import coverage
|
|
Carl George |
6644cd9 |
|
|
Carl George |
6644cd9 |
env = os.environ.copy()
|
|
Carl George |
6644cd9 |
env["SH_TESTS_RUNNING"] = "1"
|
|
Carl George |
6644cd9 |
- if coverage:
|
|
Carl George |
6644cd9 |
- test.append_module_path(env, coverage)
|
|
Carl George |
6644cd9 |
|
|
Carl George |
6644cd9 |
# if we're testing locally, run all versions of python on the system
|
|
Carl George |
6644cd9 |
if action == "test":
|
|
Carl George |
b213e8e |
diff -Naurp sh-1.12.14.orig/test.py sh-1.12.14/test.py
|
|
Carl George |
b213e8e |
--- sh-1.12.14.orig/test.py 2017-06-06 21:51:42.000000000 -0500
|
|
Carl George |
b213e8e |
+++ sh-1.12.14/test.py 2017-06-07 08:49:59.351791993 -0500
|
|
Carl George |
6644cd9 |
@@ -6,31 +6,6 @@ IS_PY3 = sys.version_info[0] == 3
|
|
Carl George |
6644cd9 |
IS_PY2 = not IS_PY3
|
|
Carl George |
6644cd9 |
MINOR_VER = sys.version_info[1]
|
|
Carl George |
6644cd9 |
|
|
Carl George |
6644cd9 |
-# coverage doesn't work in python 3.1, 3.2 due to it just being a shit
|
|
Carl George |
6644cd9 |
-# python
|
|
Carl George |
6644cd9 |
-HAS_UNICODE_LITERAL = not (IS_PY3 and MINOR_VER in (1, 2))
|
|
Carl George |
6644cd9 |
-
|
|
Carl George |
6644cd9 |
-cov = None
|
|
Carl George |
6644cd9 |
-if HAS_UNICODE_LITERAL:
|
|
Carl George |
6644cd9 |
- run_idx = int(os.environ.pop("SH_TEST_RUN_IDX", "0"))
|
|
Carl George |
6644cd9 |
- first_run = run_idx == 0
|
|
Carl George |
6644cd9 |
-
|
|
Carl George |
6644cd9 |
- import coverage
|
|
Carl George |
6644cd9 |
-
|
|
Carl George |
6644cd9 |
- # for some reason, we can't run auto_data on the first run, or the coverage
|
|
Carl George |
6644cd9 |
- # numbers get really screwed up
|
|
Carl George |
6644cd9 |
- auto_data = True
|
|
Carl George |
6644cd9 |
- if first_run:
|
|
Carl George |
6644cd9 |
- auto_data = False
|
|
Carl George |
6644cd9 |
-
|
|
Carl George |
6644cd9 |
- cov = coverage.Coverage(auto_data=auto_data)
|
|
Carl George |
6644cd9 |
-
|
|
Carl George |
6644cd9 |
- if first_run:
|
|
Carl George |
6644cd9 |
- cov.erase()
|
|
Carl George |
6644cd9 |
-
|
|
Carl George |
6644cd9 |
- cov.start()
|
|
Carl George |
6644cd9 |
-
|
|
Carl George |
6644cd9 |
-
|
|
Carl George |
6644cd9 |
from os.path import exists, join, realpath, dirname, split
|
|
Carl George |
6644cd9 |
import unittest
|
|
Carl George |
b213e8e |
try:
|
|
Carl George |
b213e8e |
@@ -3045,6 +3020,4 @@ if __name__ == "__main__":
|
|
Carl George |
6644cd9 |
exit(1)
|
|
Carl George |
6644cd9 |
|
|
Carl George |
6644cd9 |
finally:
|
|
Carl George |
6644cd9 |
- if cov:
|
|
Carl George |
6644cd9 |
- cov.stop()
|
|
Carl George |
6644cd9 |
- cov.save()
|
|
Carl George |
6644cd9 |
+ pass
|