Skip to content

Commit bcebc92

Browse files
committed
Switch to python -m pytest, refs #9
1 parent 4b825ed commit bcebc92

4 files changed

Lines changed: 7 additions & 7 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,16 @@ If your library is called `my-new-library`, you can start working on it like so:
4040
```bash
4141
cd my-new-library
4242
# Create and activate a virtual environment:
43-
python3 -mvenv venv
43+
python -m venv venv
4444
source venv/bin/activate
4545
# Install dependencies so you can edit the project:
46-
pip install -e '.[test]'
46+
python -m pip install -e '.[test]'
4747
# With zsh you have to run this again for some reason:
4848
source venv/bin/activate
4949
```
5050
You can run the default test for your library like so:
5151
```bash
52-
pytest
52+
python -m pytest
5353
```
5454
This will execute the test in `tests/test_my_new_library.py`.
5555

{{cookiecutter.hyphenated}}/.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
pip install '.[test]'
2727
- name: Run tests
2828
run: |
29-
pytest
29+
python -m pytest
3030
deploy:
3131
runs-on: ubuntu-latest
3232
needs: [test]

{{cookiecutter.hyphenated}}/.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ jobs:
2424
pip install '.[test]'
2525
- name: Run tests
2626
run: |
27-
pytest
27+
python -m pytest
2828
{% endraw %}

{{cookiecutter.hyphenated}}/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ source venv/bin/activate
2727
```
2828
Now install the dependencies and test dependencies:
2929
```bash
30-
pip install -e '.[test]'
30+
python -m pip install -e '.[test]'
3131
```
3232
To run the tests:
3333
```bash
34-
pytest
34+
python -m pytest
3535
```

0 commit comments

Comments
 (0)