You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/README.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,27 +24,27 @@ We are using the following modules and packages for our unit tests:
24
24
We also use the following package as a test runner:
25
25
-[pytest](https://docs.pytest.org/en/6.2.x/)
26
26
27
-
To ensure the results you obtain on your personal machine are comparable to those generated in the CI, please make sure to run your tests with the virtual environment defined by our [Poetry Project](/pyproject.toml). To run your tests with `poetry`, we've provided the following "script" shortcuts:
27
+
To ensure the results you obtain on your personal machine are comparable to those generated in the CI, please make sure to run your tests with the virtual environment defined by our [UV Project](/pyproject.toml). To run your tests with `uv`, we've provided the following "script" shortcuts:
28
28
29
-
-`poetry run task test` will run `pytest`.
30
-
-`poetry run task test path/to/test.py` will run a specific test.
31
-
-`poetry run task test-cov` will run `pytest` with `pytest-cov`.
32
-
-`poetry run task report` will generate a coverage report of the tests you've run with `poetry run task test-cov`. If you append the `-m` flag to this command, the report will include the lines and branches not covered by tests in addition to the test coverage report.
29
+
-`uv run task test` will run `pytest`.
30
+
-`uv run task test path/to/test.py` will run a specific test.
31
+
-`uv run task test-cov` will run `pytest` with `pytest-cov`.
32
+
-`uv run task report` will generate a coverage report of the tests you've run with `uv run task test-cov`. If you append the `-m` flag to this command, the report will include the lines and branches not covered by tests in addition to the test coverage report.
33
33
34
-
If you want a coverage report, make sure to run the tests with `poetry run task test-cov`*first*.
34
+
If you want a coverage report, make sure to run the tests with `uv run task test-cov`*first*.
35
35
36
36
## Running tests
37
37
There are multiple ways to run the tests, which one you use will be determined by your goal, and stage in development.
38
38
39
39
When actively developing, you'll most likely be working on one portion of the codebase, and as a result, won't need to run the entire test suite.
40
40
To run just one file, and save time, you can use the following command:
41
41
```shell
42
-
poetry run task test<path/to/file.py>
42
+
uv run task test<path/to/file.py>
43
43
```
44
44
45
45
For example:
46
46
```shell
47
-
poetry run task test tests/bot/exts/test_cogs.py
47
+
uv run task test tests/bot/exts/test_cogs.py
48
48
```
49
49
will run the test suite in the `test_cogs` file.
50
50
@@ -53,7 +53,7 @@ If you'd like to collect coverage as well, you can append `--cov` to the command
53
53
54
54
If you're done and are preparing to commit and push your code, it's a good idea to run the entire test suite as a sanity check:
0 commit comments