66from pathlib import Path
77from typing import TYPE_CHECKING , Any
88
9- from snapshot_support import normalize_temp_root
109from syrupy .extensions .json import JSONSnapshotExtension
11- from syrupy .extensions .single_file import SingleFileSnapshotExtension , WriteMode
1210
1311from python_lang_project_harness import (
14- render_python_lang_harness ,
1512 run_python_lang_harness ,
1613)
1714
@@ -38,21 +35,6 @@ def get_file_basename(cls, *, test_location: Any, index: object) -> str:
3835 return super ().get_file_basename (test_location = test_location , index = index )
3936
4037
41- class _ScenarioTextSnapshotExtension (SingleFileSnapshotExtension ):
42- _write_mode = WriteMode .TEXT
43- file_extension = "txt"
44-
45- @classmethod
46- def dirname (cls , * , test_location : Any ) -> str :
47- return str (_SCENARIO / "expect" )
48-
49- @classmethod
50- def get_file_basename (cls , * , test_location : Any , index : object ) -> str :
51- if isinstance (index , str ):
52- return index
53- return super ().get_file_basename (test_location = test_location , index = index )
54-
55-
5638def test_py_software_criterion_control_flow_v1_snapshot (
5739 tmp_path : Path ,
5840 snapshot : SnapshotAssertion ,
@@ -71,7 +53,6 @@ def test_py_software_criterion_control_flow_v1_snapshot(
7153 }
7254 for finding in filtered .findings
7355 ]
74- rendered = normalize_temp_root (render_python_lang_harness (filtered ), tmp_path )
7556
7657 assert {finding ["softwareCriteria" ] for finding in findings } == {
7758 "control-flow.decision-stack" ,
@@ -84,10 +65,6 @@ def test_py_software_criterion_control_flow_v1_snapshot(
8465 snapshot (name = "findings" , extension_class = _ScenarioJsonSnapshotExtension )
8566 == findings
8667 )
87- assert (
88- snapshot (name = "rendered" , extension_class = _ScenarioTextSnapshotExtension )
89- == rendered
90- )
9168
9269
9370def test_py_software_criterion_control_flow_v1_scenario_benchmark_contract () -> None :
0 commit comments