-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove round-trip tests of urlsplit()
- Don't count of tests results based on test of sys.version_info, because security fixes are often backported.
- Loading branch information
Showing
4 changed files
with
8 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,6 @@ | |
# | ||
# @author Davide Brunato <[email protected]> | ||
# | ||
import sys | ||
import unittest | ||
import logging | ||
import warnings | ||
|
@@ -701,13 +700,13 @@ class CustomLocalXMLSchema(self.schema_class): | |
schema = CustomLocalXMLSchema(str(schema_file)) | ||
self.assertTrue(schema.is_valid(str(xml_file))) | ||
|
||
with self.assertRaises((pickle.PicklingError, AttributeError)) as ec: | ||
with self.assertRaises((pickle.PicklingError, AttributeError)) as ec: # type: ignore | ||
pickle.dumps(schema) | ||
|
||
if sys.version_info[:3] <= (3, 12, 4): | ||
self.assertIn("Can't pickle", str(ec.exception)) | ||
else: | ||
self.assertIn("Can't get local object", str(ec.exception)) | ||
error_message = str(ec.exception) | ||
self.assertTrue( | ||
"Can't get local object" in error_message or "Can't pickle" in error_message | ||
) | ||
|
||
def test_meta_schema_validation(self): | ||
self.assertTrue(self.schema_class.meta_schema.is_valid(self.vh_xsd_file)) | ||
|