File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change 33import unittest
44from pathlib import Path
55
6+ try :
7+ import yaml as _yaml # noqa: F401
8+ except ModuleNotFoundError : # pragma: no cover
9+ _HAS_YAML = False
10+ else :
11+ _HAS_YAML = True
12+
613
714class TestQAStatic (unittest .TestCase ):
815 def test_contract_lint_requires_required_columns (self ):
@@ -17,6 +24,7 @@ def test_contract_lint_requires_required_columns(self):
1724 # Minimal OK
1825 contract_lint ({"required_columns" : ["condition" ]})
1926
27+ @unittest .skipUnless (_HAS_YAML , "pyyaml is not installed" )
2028 def test_static_qa_reads_acceptance_from_config_qa (self ):
2129 from psyflow .qa .static import static_qa
2230
Original file line number Diff line number Diff line change 55from unittest .mock import patch
66import json
77
8+ try :
9+ import yaml as _yaml # noqa: F401
10+ except ModuleNotFoundError : # pragma: no cover
11+ _HAS_YAML = False
12+ else :
13+ _HAS_YAML = True
14+
815
916class TestTaskLauncher (unittest .TestCase ):
1017 def test_run_task_shortcut_directory_with_config_and_passthrough (self ):
@@ -113,6 +120,7 @@ def test_readme_maturity_badge_handles_non_utf8_readme(self):
113120 out = readme .read_text (encoding = "cp1252" )
114121 self .assertIn ("Maturity: piloted" , out )
115122
123+ @unittest .skipUnless (_HAS_YAML , "pyyaml is not installed" )
116124 def test_run_qa_shortcut_requires_acceptance_criteria (self ):
117125 from psyflow .task_launcher import run_qa_shortcut
118126
You can’t perform that action at this time.
0 commit comments