diff options
-rw-r--r-- | appveyor.yml | 2 | ||||
-rw-r--r-- | psutil/tests/__init__.py | 2 | ||||
-rwxr-xr-x | scripts/internal/winmake.py | 12 |
3 files changed, 2 insertions, 14 deletions
diff --git a/appveyor.yml b/appveyor.yml index b1867724..3396cb90 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -91,7 +91,7 @@ build: off test_script: - "%WITH_COMPILER% %PYTHON%/python -V" - - "set PSUTIL_TESTING=1 && %WITH_COMPILER% %PYTHON%/python psutil/tests/__main__.py" + - "%WITH_COMPILER% %PYTHON%/python psutil/tests/__main__.py" after_test: - "%WITH_COMPILER% %PYTHON%/python setup.py bdist_wheel" diff --git a/psutil/tests/__init__.py b/psutil/tests/__init__.py index 5bb54017..86930100 100644 --- a/psutil/tests/__init__.py +++ b/psutil/tests/__init__.py @@ -744,7 +744,7 @@ unittest.TestCase = TestCase def _setup_tests(): - assert 'PSUTIL_TESTING' in os.environ + os.environ['PSUTIL_TESTING'] = '1' assert psutil._psplatform.cext.py_psutil_testing() diff --git a/scripts/internal/winmake.py b/scripts/internal/winmake.py index c2ee2ab0..185db7ee 100755 --- a/scripts/internal/winmake.py +++ b/scripts/internal/winmake.py @@ -328,7 +328,6 @@ def flake8(): def test(): """Run tests""" install() - os.environ['PSUTIL_TESTING'] = '1' sh("%s -Wa %s" % (PYTHON, TSCRIPT)) @@ -337,7 +336,6 @@ def coverage(): """Run coverage tests.""" # Note: coverage options are controlled by .coveragerc file install() - os.environ['PSUTIL_TESTING'] = '1' sh("%s -Wa -m coverage run %s" % (PYTHON, TSCRIPT)) sh("%s -m coverage report" % PYTHON) sh("%s -m coverage html" % PYTHON) @@ -348,7 +346,6 @@ def coverage(): def test_process(): """Run process tests""" install() - os.environ['PSUTIL_TESTING'] = '1' sh("%s -Wa -m unittest -v psutil.tests.test_process" % PYTHON) @@ -356,7 +353,6 @@ def test_process(): def test_system(): """Run system tests""" install() - os.environ['PSUTIL_TESTING'] = '1' sh("%s -Wa -m unittest -v psutil.tests.test_system" % PYTHON) @@ -364,7 +360,6 @@ def test_system(): def test_platform(): """Run windows only tests""" install() - os.environ['PSUTIL_TESTING'] = '1' sh("%s -Wa -m unittest -v psutil.tests.test_windows" % PYTHON) @@ -372,7 +367,6 @@ def test_platform(): def test_misc(): """Run misc tests""" install() - os.environ['PSUTIL_TESTING'] = '1' sh("%s -Wa -m unittest -v psutil.tests.test_misc" % PYTHON) @@ -380,7 +374,6 @@ def test_misc(): def test_unicode(): """Run unicode tests""" install() - os.environ['PSUTIL_TESTING'] = '1' sh("%s -Wa -m unittest -v psutil.tests.test_unicode" % PYTHON) @@ -388,7 +381,6 @@ def test_unicode(): def test_connections(): """Run connections tests""" install() - os.environ['PSUTIL_TESTING'] = '1' sh("%s -Wa -m unittest -v psutil.tests.test_connections" % PYTHON) @@ -396,7 +388,6 @@ def test_connections(): def test_contracts(): """Run contracts tests""" install() - os.environ['PSUTIL_TESTING'] = '1' sh("%s -Wa -m unittest -v psutil.tests.test_contracts" % PYTHON) @@ -409,7 +400,6 @@ def test_by_name(): except IndexError: sys.exit('second arg missing') install() - os.environ['PSUTIL_TESTING'] = '1' sh("%s -Wa -m unittest -v %s" % (PYTHON, name)) @@ -422,7 +412,6 @@ def test_script(): except IndexError: sys.exit('second arg missing') install() - os.environ['PSUTIL_TESTING'] = '1' sh("%s -Wa %s" % (PYTHON, name)) @@ -430,7 +419,6 @@ def test_script(): def test_memleaks(): """Run memory leaks tests""" install() - os.environ['PSUTIL_TESTING'] = '1' sh("%s -Wa psutil\\tests\\test_memory_leaks.py" % PYTHON) |