Skip to content

Commit df2e48f

Browse files
PoolitzerBibo-Joshi
andcommitted
Add Custom pytest Marker to Ease Development (python-telegram-bot#2628)
* Feat: Custom pytest marker Co-authored-by: Bibo-Joshi <[email protected]>
1 parent 5b3983d commit df2e48f

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

.github/CONTRIBUTING.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ Here's how to make a one-off code change.
8585

8686
- Please ensure that the code you write is well-tested.
8787

88+
- In addition to that, we provide the `dev` marker for pytest. If you write one or multiple tests and want to run only those, you can decorate them via `@pytest.mark.dev` and then run it with minimal overhead with `pytest ./path/to/test_file.py -m dev`.
89+
8890
- Don’t break backward compatibility.
8991

9092
- Add yourself to the AUTHORS.rst_ file in an alphabetical fashion.

setup.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ filterwarnings =
3030
; Unfortunately due to https://github.com/pytest-dev/pytest/issues/8343 we can't have this here
3131
; and instead do a trick directly in tests/conftest.py
3232
; ignore::telegram.utils.deprecate.TelegramDeprecationWarning
33+
markers = dev: If you want to test a specific test, use this
3334

3435
[coverage:run]
3536
branch = True

0 commit comments

Comments
 (0)