ultralytics 8.0.179 base Model class from nn.Module (#4911)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Glenn Jocher 2023-09-15 02:39:09 +02:00 committed by GitHub
parent c8de4fe634
commit c17106db1f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 101 additions and 56 deletions

View file

@ -39,6 +39,19 @@ def pytest_runtest_setup(item):
pytest.skip('skip slow tests unless --slow is set')
def pytest_collection_modifyitems(config, items):
"""
Modify the list of test items to remove tests marked as slow if the --slow option is not provided.
Args:
config (pytest.config.Config): The pytest config object.
items (list): List of test items to be executed.
"""
if not config.getoption('--slow'):
# Remove the item entirely from the list of test items if it's marked as 'slow'
items[:] = [item for item in items if 'slow' not in item.keywords]
def pytest_sessionstart(session):
"""
Initialize session configurations for pytest.