Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

conftest.py 576 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
  1. import pytest
  2. def pytest_addoption(parser):
  3. parser.addoption('--runslow', action='store_true', default=False, help='run slow tests')
  4. def pytest_configure(config):
  5. config.addinivalue_line('markers', 'slow: mark test as slow to run')
  6. def pytest_collection_modifyitems(config, items):
  7. if config.getoption('--runslow'):
  8. # --runslow given in cli: do not skip slow tests
  9. return
  10. skip_slow = pytest.mark.skip(reason='need --runslow option to run')
  11. for item in items:
  12. if 'slow' in item.keywords:
  13. item.add_marker(skip_slow)
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...