forked from motioneye-project/motioneye
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconftest.py
More file actions
16 lines (14 loc) · 706 Bytes
/
Copy pathconftest.py
File metadata and controls
16 lines (14 loc) · 706 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
"""Pytest configuration."""
def pytest_collection_modifyitems(config, items):
"""Modify collected test items to exclude non-test functions from source files."""
filtered_items = []
for item in items:
# Exclude functions that are imported from motioneye package
# These are utility/source functions, not actual tests
if hasattr(item, 'obj') and hasattr(item.obj, '__module__'):
# Skip functions from motioneye.* modules (source code)
# Only include actual test functions from tests/ directory
if item.obj.__module__.startswith('motioneye.'):
continue
filtered_items.append(item)
items[:] = filtered_items