Skip to content

Commit

Permalink
debian: switch to pytest in debian/rules and test/Makefile
Browse files Browse the repository at this point in the history
Running `python setup.py test` is deprecated. So switch to `pytest`
instead.
  • Loading branch information
mvo5 committed May 10, 2024
1 parent 59fa2dc commit 21a6be3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Build-Depends: debhelper (>= 9.20160709),
Build-Depends-Indep: python3-dev,
python3-coverage,
python3-distro-info,
python3-pytest,
pycodestyle | pep8,
# powermgmt-base, (tests disable on_ac_power checks)
flake8,
Expand Down
2 changes: 1 addition & 1 deletion debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ override_dh_auto_build:
$(PYTHON) setup.py build

override_dh_auto_test:
$(PYTHON) setup.py test
pytest
# TODO: make sure this happens in the actual python test
make -C test/packages clean

Expand Down
3 changes: 2 additions & 1 deletion test/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ test-packages:

check: test-packages
#PYTHONPATH=.. python3 -m unittest
PYTHONPATH=.. python3 -m coverage run -a -m unittest
PYTHONPATH=.. coverage run -a -m pytest
PYTHONPATH=.. coverage report unattended_upgrade.py

clean:
$(MAKE) -C packages clean
Expand Down

0 comments on commit 21a6be3

Please sign in to comment.