Skip to content

Commit

Permalink
rm PYTEST_COV_ARGS since it's defined in pyproject.yml already
Browse files Browse the repository at this point in the history
  • Loading branch information
giampaolo committed Jun 20, 2024
1 parent f952d53 commit a433387
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 deletions.
7 changes: 1 addition & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,6 @@ endif
INSTALL_OPTS = `$(PYTHON) -c "import sys; print('' if hasattr(sys, 'real_prefix') else '--user')"`
TEST_PREFIX = PYTHONWARNINGS=always
PYTEST_ARGS = -v --tb=native -o cache_dir=/tmp/pyftpdlib-pytest-cache
PYTEST_COV_ARGS = \
--source=. \
--omit=__pycache__ \
--omit=scripts \
--omit=pyftpdlib/test
NUM_WORKERS = `$(PYTHON) -c "import os; print(os.cpu_count() or 1)"`


Expand Down Expand Up @@ -154,7 +149,7 @@ test-lastfailed: ## Run previously failed tests
test-coverage: ## Run test coverage.
${MAKE} install
rm -rf .coverage htmlcov
$(TEST_PREFIX) $(PYTHON) -m coverage run $(PYTEST_COV_ARGS) -m pytest $(PYTEST_ARGS) $(ARGS)
$(TEST_PREFIX) $(PYTHON) -m coverage run -m pytest $(PYTEST_ARGS) $(ARGS)
$(PYTHON) -m coverage report
@echo "writing results to htmlcov/index.html"
$(PYTHON) -m coverage html
Expand Down
11 changes: 2 additions & 9 deletions scripts/internal/winmake.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

APPVEYOR = bool(os.environ.get('APPVEYOR'))
PYTHON = sys.executable if APPVEYOR else os.getenv('PYTHON', sys.executable)
PYTEST_ARGS = "-v --tb=native -o "
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 @@ -61,11 +62,6 @@
RED = 4
DEFAULT_COLOR = 7

PYTEST_ARGS = "-v --tb=native -o "
PYTEST_COV_ARGS = (
"--source=. --omit=__pycache__ --omit=scripts --omit=pyftpdlib/test"
)


# ===================================================================
# utils
Expand Down Expand Up @@ -418,10 +414,7 @@ def test_servers():
def coverage():
"""Run coverage tests."""
build()
sh(
"%s -m coverage run %s -m pytest %s"
% (PYTHON, PYTEST_COV_ARGS, PYTEST_ARGS)
)
sh("%s -m coverage run -m pytest %s" % (PYTHON, PYTEST_ARGS))
sh("%s -m coverage report" % PYTHON)
sh("%s -m coverage html" % PYTHON)
sh("%s -m webbrowser -t htmlcov/index.html" % PYTHON)
Expand Down

0 comments on commit a433387

Please sign in to comment.