@@ -48,7 +48,6 @@ def test_static_context(self) -> None:
4848 """
4949
5050 LINES = [1 , 2 , 4 ]
51- ARCS = [(- 1 , 1 ), (1 , 2 ), (2 , 4 ), (4 , - 1 )]
5251
5352 def run_red_blue (self , ** options : TCovKwargs ) -> tuple [CoverageData , CoverageData ]:
5453 """Run red.py and blue.py, and return their CoverageData objects."""
@@ -93,6 +92,13 @@ def assert_combined_lines(filename: str, context: str, lines: list[TLineNo]) ->
9392
9493 def test_combining_arc_contexts (self ) -> None :
9594 red_data , blue_data = self .run_red_blue (branch = True )
95+
96+ # The exact arc data changes depending on the core and the version.
97+ # Extract the red arc data for comparisons below.
98+ arc_data = red_data .arcs (
99+ next (fname for fname in red_data .measured_files () if "red.py" in fname )
100+ )
101+
96102 for datas in [[red_data , blue_data ], [blue_data , red_data ]]:
97103 combined = CoverageData (suffix = "combined" )
98104 for data in datas :
@@ -121,10 +127,10 @@ def assert_combined_arcs(filename: str, context: str, lines: list[TArc]) -> None
121127 combined .set_query_context (context )
122128 assert combined .arcs (filename ) == lines
123129
124- assert_combined_arcs (fred , 'red' , self . ARCS )
130+ assert_combined_arcs (fred , 'red' , arc_data )
125131 assert_combined_arcs (fred , 'blue' , [])
126132 assert_combined_arcs (fblue , 'red' , [])
127- assert_combined_arcs (fblue , 'blue' , self . ARCS )
133+ assert_combined_arcs (fblue , 'blue' , arc_data )
128134
129135
130136@pytest .mark .skipif (not testenv .DYN_CONTEXTS , reason = "No dynamic contexts with this core" )
0 commit comments