Eric Snow | fbc7851 | 2014-01-02 22:25:00 -0700 | [diff] [blame^] | 1 | from . import util |
| 2 | frozen_machinery, source_machinery = util.import_importlib('importlib.machinery') |
| 3 | |
| 4 | import sys |
| 5 | import unittest |
| 6 | |
| 7 | |
| 8 | @unittest.skipUnless(sys.platform.startswith('win'), 'requires Windows') |
| 9 | class WindowsRegistryFinderTests: |
| 10 | |
| 11 | # XXX Need a test that finds the spec via the registry. |
| 12 | |
| 13 | def test_find_spec_missing(self): |
| 14 | spec = self.machinery.WindowsRegistryFinder.find_spec('spam') |
| 15 | self.assertIs(spec, None) |
| 16 | |
| 17 | def test_find_module_missing(self): |
| 18 | loader = self.machinery.WindowsRegistryFinder.find_module('spam') |
| 19 | self.assertIs(loader, None) |
| 20 | |
| 21 | |
| 22 | class Frozen_WindowsRegistryFinderTests(WindowsRegistryFinderTests, |
| 23 | unittest.TestCase): |
| 24 | machinery = frozen_machinery |
| 25 | |
| 26 | |
| 27 | class Source_WindowsRegistryFinderTests(WindowsRegistryFinderTests, |
| 28 | unittest.TestCase): |
| 29 | machinery = source_machinery |