Пример #1
0
 def test_package_module(self):
     p = test_NoseXUnit.Package('foo_1')
     m = test_NoseXUnit.Module('foo_2')
     p.append(m)
     p.save(self.source)
     expected = {p.full(): p.path(),
                 m.full(): m.path(), }
     self.assertEqual(expected, ntools.packages(self.source, search=True, exclude=[]))
Пример #2
0
    def setUpCase(self):
        content = """
def hello():
    return "hello"
"""
        package = test_NoseXUnit.Package('foo_1')
        package.append(test_NoseXUnit.Module('foo_2', content))
        package.save(self.source)
        self.suitepath = self.source
        self.setUpCore(self.core_target, self.source)
        self.setUpAudit(self.audit_target)
Пример #3
0
 def test_package(self):
     p = test_NoseXUnit.Package('foo').save(self.source)
     expected = {'foo': p.path(), }
     self.assertEqual(expected, ntools.packages(self.source, search=False, exclude=[]))
Пример #4
0
 def test_module_in_package(self):
     p = test_NoseXUnit.Package('foo_1')
     m = test_NoseXUnit.Module('foo_2')
     p.append(m)
     p.save(self.source)
     self.assertPackage(m)
Пример #5
0
 def test_package_in_package(self):
     p1 = test_NoseXUnit.Package('foo_1')
     p2 = test_NoseXUnit.Package('foo_2')
     p1.append(p2)
     p1.save(self.source)
     self.assertPackage(p2)
Пример #6
0
 def test_package(self):
     self.assertPackage(test_NoseXUnit.Package('foo').save(self.source))