Skip to content

Commit

Permalink
fix appveyor err + winmake
Browse files Browse the repository at this point in the history
  • Loading branch information
giampaolo committed Apr 30, 2020
1 parent a1b4b33 commit debf1ad
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
3 changes: 2 additions & 1 deletion psutil/tests/test_unicode.py
Expand Up @@ -124,8 +124,9 @@ def safe_rmpath(path): # NOQA
# https://github.com/giampaolo/psutil/blob/
# 68c7a70728a31d8b8b58f4be6c4c0baa2f449eda/psutil/arch/
# windows/process_info.c#L146
from psutil.tests import safe_rmpath as _rm
try:
return safe_rmpath(path)
return _rm(path)
except WindowsError:
traceback.print_exc()

Expand Down
9 changes: 4 additions & 5 deletions scripts/internal/winmake.py
Expand Up @@ -31,7 +31,7 @@
PYTHON = sys.executable
else:
PYTHON = os.getenv('PYTHON', sys.executable)
TEST_SCRIPT = 'psutil\\tests\\runner.py'
RUNNER_PY = 'psutil\\tests\\runner.py'
GET_PIP_URL = "https://bootstrap.pypa.io/get-pip.py"
PY3 = sys.version_info[0] == 3
HERE = os.path.abspath(os.path.dirname(__file__))
Expand Down Expand Up @@ -397,7 +397,7 @@ def lint():
sh("%s -m flake8 %s" % (PYTHON, py_files), nolog=True)


def test(script=TEST_SCRIPT):
def test(script=RUNNER_PY):
"""Run tests"""
install()
test_setup()
Expand All @@ -411,7 +411,7 @@ def coverage():
# Note: coverage options are controlled by .coveragerc file
install()
test_setup()
sh("%s -m coverage run %s" % (PYTHON, TEST_SCRIPT))
sh("%s -m coverage run %s" % (PYTHON, RUNNER_PY))
sh("%s -m coverage report" % PYTHON)
sh("%s -m coverage html" % PYTHON)
sh("%s -m webbrowser -t htmlcov/index.html" % PYTHON)
Expand Down Expand Up @@ -477,8 +477,7 @@ def test_failed():
"""Re-run tests which failed on last run."""
install()
test_setup()
sh('%s -c "import psutil.tests.runner as r; r.run(last_failed=True)"' % (
PYTHON))
sh("%s %s --last-failed" % (PYTHON, RUNNER_PY))


def test_memleaks():
Expand Down

0 comments on commit debf1ad

Please sign in to comment.