Skip to content

Commit

Permalink
Update to nose2
Browse files Browse the repository at this point in the history
  • Loading branch information
tannisroot committed Dec 14, 2021
1 parent f790b9a commit 382a321
Show file tree
Hide file tree
Showing 6 changed files with 107 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/run_testsuite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ jobs:
- run: pip install --upgrade pip poetry
- run: echo LUTRIS_SKIP_INIT=1 >.env
- run: make dev
- run: xvfb-run --auto-servernum poetry run nosetests
- run: xvfb-run --auto-servernum poetry run nose2
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ Running tests
Be sure to test your changes thoroughly, never submit changes without running
the code. At the very least, run the test suite and check that nothing broke.
You can run the test suite by typing `make test` in the source directory.
In order to run the test, you'll need to install nosetests and flake8:
In order to run the test, you'll need to install nose2 and flake8:

pip3 install nose flake8
pip3 install nose2 flake8

QAing your changes
------------------
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ release: build-source upload upload-ppa

test:
rm tests/fixtures/pga.db -f
nosetests
nose2

cover:
rm tests/fixtures/pga.db -f
rm tests/coverage/ -rf
nosetests --with-coverage --cover-package=lutris --cover-html --cover-html-dir=tests/coverage
nose2 --with-coverage --cover-package=lutris --cover-html --cover-html-dir=tests/coverage

pgp-renew:
osc signkey --extend home:strycore
Expand Down
2 changes: 1 addition & 1 deletion lutris/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
ICON_PATH = os.path.join(GLib.get_user_data_dir(), "icons", "hicolor", "128x128", "apps")

sio = SettingsIO(CONFIG_FILE)
if "nosetests" in sys.argv[0] or "pytest" in sys.argv[0]:
if "nose2" in sys.argv[0] or "pytest" in sys.argv[0]:
PGA_DB = "/tmp/pga.db"
else:
PGA_DB = sio.read_setting("pga_path") or os.path.join(DATA_DIR, "pga.db")
Expand Down
Loading

0 comments on commit 382a321

Please sign in to comment.