Tier 2 dev workflow: Windows test runner + result sync
- run_tests.bat: double-click test runner with JSON result capture - run_script.bat: run any script with output capture - test_results/ folder for Syncthing-based result sharing - Auto-mark NX-dependent tests for --quick mode - pytest-json-report for structured results
This commit is contained in:
@@ -9,6 +9,20 @@ from pathlib import Path
|
||||
# Add project root to path
|
||||
sys.path.insert(0, str(Path(__file__).parent.parent))
|
||||
|
||||
|
||||
def pytest_configure(config):
|
||||
"""Register custom markers."""
|
||||
config.addinivalue_line("markers", "nx: requires NX Open (skip with -m 'not nx')")
|
||||
config.addinivalue_line("markers", "slow: slow tests (skip with -m 'not slow')")
|
||||
|
||||
|
||||
def pytest_collection_modifyitems(config, items):
|
||||
"""Auto-mark tests that import NXOpen."""
|
||||
for item in items:
|
||||
# Auto-mark files with 'nx' or 'journal' in name
|
||||
if 'nx' in item.nodeid.lower() or 'journal' in item.nodeid.lower():
|
||||
item.add_marker(pytest.mark.nx)
|
||||
|
||||
@pytest.fixture
|
||||
def sample_study_dir(tmp_path):
|
||||
"""Create a temporary study directory structure."""
|
||||
|
||||
Reference in New Issue
Block a user