@@ -552,24 +552,30 @@ def pytest_generate_tests(metafunc):
552
552
"""
553
553
Generate test cases for every test fixture in all the JSON fixture files
554
554
within the specified fixtures directory, or read from stdin if the directory is 'stdin'.
555
+
556
+ This function only applies to the test_blockchain_via_engine test function
557
+ to avoid conflicts with other consume simulators.
555
558
"""
556
559
if "cache" in sys .argv :
557
560
return
558
561
562
+ # Only apply to test_blockchain_via_engine function (used by enginex and engine simulators)
563
+ if metafunc .function .__name__ != "test_blockchain_via_engine" :
564
+ return
565
+
559
566
test_cases = metafunc .config .test_cases
560
567
xdist_group_mapper = getattr (metafunc .config , "xdist_group_mapper" , None )
561
568
param_list = []
569
+
562
570
for test_case in test_cases :
563
- if test_case .format .format_name not in metafunc .config ._supported_fixture_formats :
571
+ # Check if _supported_fixture_formats is set, if not allow all formats
572
+ supported_formats = getattr (metafunc .config , "_supported_fixture_formats" , None )
573
+ if supported_formats and test_case .format .format_name not in supported_formats :
564
574
continue
565
- fork_markers = get_relative_fork_markers (test_case .fork , strict_mode = False )
566
575
567
- # Append pre_hash (first 8 chars) to test ID for easier selection with --sim.limit
568
- test_id = test_case .id
569
- if hasattr (test_case , "pre_hash" ) and test_case .pre_hash :
570
- test_id = f"{ test_case .id } [{ test_case .pre_hash [:8 ]} ]"
576
+ fork_markers = get_relative_fork_markers (test_case .fork , strict_mode = False )
571
577
572
- # Determine xdist group name
578
+ # Determine xdist group name first
573
579
if xdist_group_mapper and hasattr (test_case , "pre_hash" ) and test_case .pre_hash :
574
580
# Use the mapper to get potentially split group name
575
581
xdist_group_name = xdist_group_mapper .get_xdist_group_name (test_case )
@@ -580,6 +586,18 @@ def pytest_generate_tests(metafunc):
580
586
# No pre_hash, use test ID
581
587
xdist_group_name = test_case .id
582
588
589
+ # Create test ID showing the xdist group name for easier identification
590
+ test_id = test_case .id
591
+ if hasattr (test_case , "pre_hash" ) and test_case .pre_hash :
592
+ # Show first 8 chars of xdist group name (includes sub-group if split)
593
+ group_display = xdist_group_name [:8 ] if len (xdist_group_name ) > 8 else xdist_group_name
594
+ # If it's a split group (contains ':'), show that clearly
595
+ if ":" in xdist_group_name :
596
+ # Extract sub-group number for display
597
+ pre_hash_part , sub_group = xdist_group_name .split (":" , 1 )
598
+ group_display = f"{ pre_hash_part [:8 ]} :{ sub_group } "
599
+ test_id = f"{ test_case .id } [{ group_display } ]"
600
+
583
601
param = pytest .param (
584
602
test_case ,
585
603
id = test_id ,
0 commit comments