tests: fix breakage from moving is_stdlib_name()
This commit is contained in:
parent
7d9b7eec0c
commit
2a4157723a
|
@ -22,33 +22,30 @@ class ReprTest(testlib.TestCase):
|
||||||
|
|
||||||
|
|
||||||
class IsStdlibNameTest(testlib.TestCase):
|
class IsStdlibNameTest(testlib.TestCase):
|
||||||
klass = mitogen.master.ModuleFinder
|
func = staticmethod(mitogen.master.is_stdlib_name)
|
||||||
|
|
||||||
def call(self, fullname):
|
|
||||||
return self.klass().is_stdlib_name(fullname)
|
|
||||||
|
|
||||||
def test_builtin(self):
|
def test_builtin(self):
|
||||||
import sys
|
import sys
|
||||||
self.assertTrue(self.call('sys'))
|
self.assertTrue(self.func('sys'))
|
||||||
|
|
||||||
def test_stdlib_1(self):
|
def test_stdlib_1(self):
|
||||||
import logging
|
import logging
|
||||||
self.assertTrue(self.call('logging'))
|
self.assertTrue(self.func('logging'))
|
||||||
|
|
||||||
def test_stdlib_2(self):
|
def test_stdlib_2(self):
|
||||||
# virtualenv only symlinks some paths to its local site-packages
|
# virtualenv only symlinks some paths to its local site-packages
|
||||||
# directory. Ensure both halves of the search path return the correct
|
# directory. Ensure both halves of the search path return the correct
|
||||||
# result.
|
# result.
|
||||||
import email
|
import email
|
||||||
self.assertTrue(self.call('email'))
|
self.assertTrue(self.func('email'))
|
||||||
|
|
||||||
def test_mitogen_core(self):
|
def test_mitogen_core(self):
|
||||||
import mitogen.core
|
import mitogen.core
|
||||||
self.assertFalse(self.call('mitogen.core'))
|
self.assertFalse(self.func('mitogen.core'))
|
||||||
|
|
||||||
def test_mitogen_fakessh(self):
|
def test_mitogen_fakessh(self):
|
||||||
import mitogen.fakessh
|
import mitogen.fakessh
|
||||||
self.assertFalse(self.call('mitogen.fakessh'))
|
self.assertFalse(self.func('mitogen.fakessh'))
|
||||||
|
|
||||||
|
|
||||||
class GetModuleViaPkgutilTest(testlib.TestCase):
|
class GetModuleViaPkgutilTest(testlib.TestCase):
|
||||||
|
|
Loading…
Reference in New Issue