Exemple #1
0
    def test_package(self):
        fm = imports.find_module('foo')

        self.assertEquals(fm[0], None)
        self.assertEquals(fm[1], os.path.join(self.path, 'foo'))
Exemple #2
0
    def test_subpackage(self):
        fm = imports.find_module('bar', [os.path.join(self.path, 'foo')])

        self.assertEquals(fm[0], None)
        self.assertEquals(fm[1], os.path.join(self.path, 'foo', 'bar'))
Exemple #3
0
    def test_root(self):
        fm = imports.find_module('spam')

        self.assertEquals(type(fm[0]), file)
        self.assertTrue(fm[1].startswith(os.path.join(self.path, 'spam.py')))
    def test_subpackage(self):
        fm = imports.find_module('bar', [os.path.join(self.path, 'foo')])

        self.assertEquals(fm[0], None)
        self.assertEquals(fm[1], os.path.join(self.path, 'foo', 'bar'))
    def test_package(self):
        fm = imports.find_module('foo')

        self.assertEquals(fm[0], None)
        self.assertEquals(fm[1], os.path.join(self.path, 'foo'))
    def test_root(self):
        fm = imports.find_module('spam')

        self.assertEquals(type(fm[0]), file)
        self.assertTrue(fm[1].startswith(os.path.join(self.path, 'spam.py')))
    def test_subpackage(self):
        fm = imports.find_module("bar", [os.path.join(self.path, "foo")])

        self.assertEquals(fm[0], None)
        self.assertEquals(fm[1], os.path.join(self.path, "foo", "bar"))