magmax / python-readchar

Python library to read characters and key strokes
MIT License
143 stars 43 forks source link

Use skipif decorator #112

Closed pomponchik closed 5 months ago

pomponchik commented 5 months ago

Hello!

There is the skipif decorator, you can use it to run tests intended only for your current OS. It is useful for using the OS matrix in the CI.

https://github.com/magmax/python-readchar/blob/6ae17c235dc14c685f41e0827f565f555b3469e4/tests/linux/test_readchar.py#L62

Cube707 commented 5 months ago

know feature

but it is much easier to apply this to a whole folder instead of repeating boilerplate for every testcase:

https://github.com/magmax/python-readchar/blob/6ae17c235dc14c685f41e0827f565f555b3469e4/tests/linux/conftest.py#L10-L13