Skip to content

Commit

Permalink
tests: Put python dependencies in requirements file
Browse files Browse the repository at this point in the history
Really this is just `pytest` right now (with `flake8` included for lack
of a better location), but this provides a place to collect more test
dependencies that's better than updating a bunch of adhoc instructions.

https://phabricator.endlessm.com/T34697
  • Loading branch information
dbnicholson committed Dec 8, 2023
1 parent d8f2628 commit 542b0d5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ jobs:
ostree \
python3-gi \
python3-pip
- name: Python dependencies
run: |
python3 -m pip install flake8 pytest
- name: Checkout
uses: actions/checkout@v2
- name: Python dependencies
run: |
python3 -m pip install -r requirements-test.txt
- name: Lint
run: |
python3 -m flake8
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -394,8 +394,9 @@ Testing
=======

Some parts of the image builder can be tested with [pytest][pytest-url].
After installing pytest, run `pytest` (or `pytest-3` if `pytest` is for
python 2) from the root of the checkout.
Install the testing dependencies with `pip3 install -r
requirements-test.txt`. After installing pytest, run `pytest` (or
`pytest-3` if `pytest` is for python 2) from the root of the checkout.

Various options can be passed to `pytest` to control how the tests are
run. See the pytest [usage][pytest-usage] documentation for details.
Expand Down
3 changes: 3 additions & 0 deletions requirements-test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Python requirements for testing
flake8
pytest

0 comments on commit 542b0d5

Please sign in to comment.