@@ -272,7 +272,7 @@ def test_uppercase_extension_policy_enforcement(self):
272272
273273
274274class TestCheckWarnings (unittest .TestCase ):
275- """Tests for the check_warnings parameter in validate_schema_object and validate_schema."""
275+ """Tests for the check_for_warnings parameter in validate_schema_object and validate_schema."""
276276
277277 @classmethod
278278 def setUpClass (cls ):
@@ -283,22 +283,22 @@ def setUpClass(cls):
283283 cls .warning_schema = copy .deepcopy (clean )
284284 cls .warning_schema .header_attributes ["version" ] = "999.0.0"
285285
286- def test_clean_schema_check_warnings_false (self ):
287- """A fully compliant schema produces no issues with check_warnings =False."""
286+ def test_clean_schema_check_for_warnings_false (self ):
287+ """A fully compliant schema produces no issues with check_for_warnings =False."""
288288 with contextlib .redirect_stdout (io .StringIO ()):
289- issues = validate_schema_object (self .clean_schema , "test" , check_warnings = False )
289+ issues = validate_schema_object (self .clean_schema , "test" , check_for_warnings = False )
290290 self .assertEqual (issues , [])
291291
292- def test_clean_schema_check_warnings_true (self ):
293- """A fully compliant schema produces no issues with check_warnings =True."""
292+ def test_clean_schema_check_for_warnings_true (self ):
293+ """A fully compliant schema produces no issues with check_for_warnings =True."""
294294 with contextlib .redirect_stdout (io .StringIO ()):
295- issues = validate_schema_object (self .clean_schema , "test" , check_warnings = True )
295+ issues = validate_schema_object (self .clean_schema , "test" , check_for_warnings = True )
296296 self .assertEqual (issues , [])
297297
298- def test_warning_schema_check_warnings_true_reports_issues (self ):
299- """A prerelease version generates a warning that is reported when check_warnings =True."""
298+ def test_warning_schema_check_for_warnings_true_reports_issues (self ):
299+ """A prerelease version generates a warning that is reported when check_for_warnings =True."""
300300 with contextlib .redirect_stdout (io .StringIO ()):
301- issues = validate_schema_object (self .warning_schema , "test" , check_warnings = True )
301+ issues = validate_schema_object (self .warning_schema , "test" , check_for_warnings = True )
302302 combined = "\n " .join (issues )
303303 self .assertTrue (issues , "Expected at least one issue for prerelease version warning" )
304304 self .assertIn (
@@ -313,14 +313,14 @@ def test_warning_schema_check_warnings_true_reports_issues(self):
313313 # because a clean schema with only a version warning should roundtrip without further errors.
314314 self .assertEqual (len (issues ), 1 , "Roundtrip should have run and produced no additional errors" )
315315
316- def test_warning_schema_check_warnings_false_suppresses_warnings (self ):
317- """Warnings are suppressed and validation passes when check_warnings =False."""
316+ def test_warning_schema_check_for_warnings_false_suppresses_warnings (self ):
317+ """Warnings are suppressed and validation passes when check_for_warnings =False."""
318318 with contextlib .redirect_stdout (io .StringIO ()):
319- issues = validate_schema_object (self .warning_schema , "test" , check_warnings = False )
319+ issues = validate_schema_object (self .warning_schema , "test" , check_for_warnings = False )
320320 self .assertEqual (issues , [])
321321
322322 def test_validate_schema_default_is_warnings_false (self ):
323- """validate_schema default check_warnings =False matches explicit False."""
323+ """validate_schema default check_for_warnings =False matches explicit False."""
324324 schema_path = os .path .join (
325325 os .path .dirname (os .path .dirname (__file__ )),
326326 "data" ,
@@ -329,5 +329,5 @@ def test_validate_schema_default_is_warnings_false(self):
329329 )
330330 with contextlib .redirect_stdout (io .StringIO ()):
331331 default_issues = validate_schema (schema_path )
332- explicit_issues = validate_schema (schema_path , check_warnings = False )
332+ explicit_issues = validate_schema (schema_path , check_for_warnings = False )
333333 self .assertEqual (default_issues , explicit_issues )
0 commit comments