Staging
v0.5.1
https://github.com/python/cpython
Raw File
Tip revision: c126fdc0bddc9f52d3bc859104741976a6fad9b5 authored by Larry Hastings on 19 July 2018, 12:12:59 UTC
Version bump for 3.4.9rc1.
Tip revision: c126fdc
test_windows.py
from . import util
frozen_machinery, source_machinery = util.import_importlib('importlib.machinery')

import sys
import unittest


@unittest.skipUnless(sys.platform.startswith('win'), 'requires Windows')
class WindowsRegistryFinderTests:

    # XXX Need a test that finds the spec via the registry.

    def test_find_spec_missing(self):
        spec = self.machinery.WindowsRegistryFinder.find_spec('spam')
        self.assertIs(spec, None)

    def test_find_module_missing(self):
        loader = self.machinery.WindowsRegistryFinder.find_module('spam')
        self.assertIs(loader, None)


class Frozen_WindowsRegistryFinderTests(WindowsRegistryFinderTests,
                                        unittest.TestCase):
    machinery = frozen_machinery


class Source_WindowsRegistryFinderTests(WindowsRegistryFinderTests,
                                        unittest.TestCase):
    machinery = source_machinery
back to top