Ejemplo n.º 1
0
 def test_doesntBreakIfCantFindImport(self):
     try:
         createPackageStructure("","from aoeuaoeu import aocxaoieicxoe")
         createSecondPackageStructure("")
         dependencies = [d for d in
                         generatePackageDependencies(pkgstructureFile2)]
         self.assertEqual([],dependencies)
     finally:
         removeSecondPackageStructure()
         removePackageStructure()
Ejemplo n.º 2
0
 def test_doesntIncludeCurrentPackage(self):
     try:
         createPackageStructure("","import a.foo")
         createSecondPackageStructure("")
         dependencies = [d for d in
                         generatePackageDependencies(pkgstructureFile2)]
         self.assertEqual([],dependencies)
     finally:
         removeSecondPackageStructure()
         removePackageStructure()
Ejemplo n.º 3
0
 def test_followsFromImportModule(self):
     try:
         createPackageStructure("","from c import bing")
         createSecondPackageStructure("")
         dependencies = [d for d in
                         generatePackageDependencies(pkgstructureFile2)]
         self.assertEqual([pkgstructureBasedir2],dependencies)
     finally:
         removeSecondPackageStructure()
         removePackageStructure()
Ejemplo n.º 4
0
 def test_doesntBreakIfImportIsCommented(self):
     try:
         createPackageStructure("","#from aoeuaoeu import aocxaoieicxoe")
         createSecondPackageStructure("")
         dependencies = [d for d in
                         generatePackageDependencies(pkgstructureFile2,
                                                     [pkgstructureRootDir])]
         self.assertEqual([],dependencies)
     finally:
         removeSecondPackageStructure()
         removePackageStructure()
Ejemplo n.º 5
0
 def test_doesntIncludeCurrentPackage(self):
     try:
         createPackageStructure("", "import a.foo")
         createSecondPackageStructure("")
         dependencies = [
             d for d in generatePackageDependencies(pkgstructureFile2)
         ]
         self.assertEqual([], dependencies)
     finally:
         removeSecondPackageStructure()
         removePackageStructure()
Ejemplo n.º 6
0
 def test_doesntBreakIfCantFindImport(self):
     try:
         createPackageStructure("", "from aoeuaoeu import aocxaoieicxoe")
         createSecondPackageStructure("")
         dependencies = [
             d for d in generatePackageDependencies(pkgstructureFile2)
         ]
         self.assertEqual([], dependencies)
     finally:
         removeSecondPackageStructure()
         removePackageStructure()
Ejemplo n.º 7
0
 def test_followsFromImportModule(self):
     try:
         createPackageStructure("", "from c import bing")
         createSecondPackageStructure("")
         dependencies = [
             d for d in generatePackageDependencies(pkgstructureFile2)
         ]
         self.assertEqual([pkgstructureBasedir2], dependencies)
     finally:
         removeSecondPackageStructure()
         removePackageStructure()
Ejemplo n.º 8
0
 def test_doesntBreakIfImportIsCommented(self):
     try:
         createPackageStructure("", "#from aoeuaoeu import aocxaoieicxoe")
         createSecondPackageStructure("")
         dependencies = [
             d for d in generatePackageDependencies(pkgstructureFile2,
                                                    [pkgstructureRootDir])
         ]
         self.assertEqual([], dependencies)
     finally:
         removeSecondPackageStructure()
         removePackageStructure()
Ejemplo n.º 9
0
 def test_doesntBreakIfImportIsInAMultilineString(self):
     try:
         createPackageStructure("",trimLines("""
         '''
         from aoeuaoeu import aocxaoieicxoe
         '''
         """))
         createSecondPackageStructure("")
         dependencies = [d for d in
                         generatePackageDependencies(pkgstructureFile2)]
         self.assertEqual([],dependencies)
     finally:
         removeSecondPackageStructure()
         removePackageStructure()
Ejemplo n.º 10
0
 def test_doesntBreakIfImportIsInAMultilineString(self):
     try:
         createPackageStructure(
             "",
             trimLines("""
         '''
         from aoeuaoeu import aocxaoieicxoe
         '''
         """))
         createSecondPackageStructure("")
         dependencies = [
             d for d in generatePackageDependencies(pkgstructureFile2)
         ]
         self.assertEqual([], dependencies)
     finally:
         removeSecondPackageStructure()
         removePackageStructure()