diff options
author | Eric Snow <ericsnowcurrently@gmail.com> | 2014-01-04 22:06:49 (GMT) |
---|---|---|
committer | Eric Snow <ericsnowcurrently@gmail.com> | 2014-01-04 22:06:49 (GMT) |
commit | d749c7ae683a98bb2f0c1ac3c9ac2d3c5bb6e51f (patch) | |
tree | db62a95d76cc066f937039914a9c2461087b32cf /Lib/test/test_importlib/extension | |
parent | 78194cd4e920550bad4f9cad5f7411927ab3f458 (diff) | |
download | cpython-d749c7ae683a98bb2f0c1ac3c9ac2d3c5bb6e51f.zip cpython-d749c7ae683a98bb2f0c1ac3c9ac2d3c5bb6e51f.tar.gz cpython-d749c7ae683a98bb2f0c1ac3c9ac2d3c5bb6e51f.tar.bz2 |
Issue #19927: Add __eq__ to path-based loaders in importlib.
Diffstat (limited to 'Lib/test/test_importlib/extension')
-rw-r--r-- | Lib/test/test_importlib/extension/test_loader.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/test/test_importlib/extension/test_loader.py b/Lib/test/test_importlib/extension/test_loader.py index d04dff5..fd9abf2 100644 --- a/Lib/test/test_importlib/extension/test_loader.py +++ b/Lib/test/test_importlib/extension/test_loader.py @@ -28,6 +28,15 @@ class LoaderTests(abc.LoaderTests): with self.assertRaises(ImportError): self.load_module('XXX') + def test_equality(self): + other = self.machinery.ExtensionFileLoader(ext_util.NAME, + ext_util.FILEPATH) + self.assertEqual(self.loader, other) + + def test_inequality(self): + other = self.machinery.ExtensionFileLoader('_' + ext_util.NAME, + ext_util.FILEPATH) + self.assertNotEqual(self.loader, other) def test_module(self): with util.uncache(ext_util.NAME): |