File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -81,3 +81,22 @@ def test_compute_stats(fake_profiles_path):
8181 _ .requirement .profile .identifier == "a" }
8282
8383 logger .error (stats )
84+
85+
86+ def test_compute_stats_resolves_profile_from_extra_profiles_path (fake_profiles_path ):
87+ # ValidationStatistics.__initialise__ used to call Profile.load_profiles
88+ # without forwarding extra_profiles_path, so any profile that lived only
89+ # under --extra-profiles-path raised ProfileNotFound.
90+ settings = ValidationSettings .parse ({
91+ "profiles_path" : DEFAULT_PROFILES_PATH ,
92+ "extra_profiles_path" : fake_profiles_path ,
93+ "profile_identifier" : "a" ,
94+ "enable_profile_inheritance" : True ,
95+ "allow_requirement_check_override" : True ,
96+ "requirement_severity" : "REQUIRED" ,
97+ })
98+
99+ stats = ValidationStatistics .__initialise__ (validation_settings = settings )
100+
101+ assert any (p .identifier == "a" for p in stats ["profiles" ]), \
102+ "Profile 'a' from extra_profiles_path was not resolved by ValidationStatistics"
You can’t perform that action at this time.
0 commit comments