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