[zpkg] SVN: zpkgtools/branches/philikon-toplevel-modules/zpkgsetup/tests/ Test whether modules (when packaged as dependencies of other collections)

Philipp von Weitershausen philikon at philikon.de
Fri Nov 18 04:18:48 EST 2005


Log message for revision 40205:
  Test whether modules (when packaged as dependencies of other collections)
  are properly picked up.
  
  This should conclude the work on this branch. I consider it ready for merging
  to the trunk.
  

Changed:
  A   zpkgtools/branches/philikon-toplevel-modules/zpkgsetup/tests/input2/
  A   zpkgtools/branches/philikon-toplevel-modules/zpkgsetup/tests/input2/Dependencies/
  A   zpkgtools/branches/philikon-toplevel-modules/zpkgsetup/tests/input2/Dependencies/module-collection-0.0.0/
  A   zpkgtools/branches/philikon-toplevel-modules/zpkgsetup/tests/input2/Dependencies/module-collection-0.0.0/MODULE.cfg
  A   zpkgtools/branches/philikon-toplevel-modules/zpkgsetup/tests/input2/Modules/
  A   zpkgtools/branches/philikon-toplevel-modules/zpkgsetup/tests/input2/Modules/module.py
  A   zpkgtools/branches/philikon-toplevel-modules/zpkgsetup/tests/input2/collection/
  A   zpkgtools/branches/philikon-toplevel-modules/zpkgsetup/tests/input2/collection/DEPENDENCIES.cfg
  U   zpkgtools/branches/philikon-toplevel-modules/zpkgsetup/tests/test_setup.py

-=-
Added: zpkgtools/branches/philikon-toplevel-modules/zpkgsetup/tests/input2/Dependencies/module-collection-0.0.0/MODULE.cfg
===================================================================
--- zpkgtools/branches/philikon-toplevel-modules/zpkgsetup/tests/input2/Dependencies/module-collection-0.0.0/MODULE.cfg	2005-11-18 09:17:55 UTC (rev 40204)
+++ zpkgtools/branches/philikon-toplevel-modules/zpkgsetup/tests/input2/Dependencies/module-collection-0.0.0/MODULE.cfg	2005-11-18 09:18:48 UTC (rev 40205)
@@ -0,0 +1 @@
+module module.py
\ No newline at end of file

Copied: zpkgtools/branches/philikon-toplevel-modules/zpkgsetup/tests/input2/Modules/module.py (from rev 40157, zpkgtools/branches/philikon-toplevel-modules/zpkgtools/tests/input/module.py)

Added: zpkgtools/branches/philikon-toplevel-modules/zpkgsetup/tests/input2/collection/DEPENDENCIES.cfg
===================================================================
--- zpkgtools/branches/philikon-toplevel-modules/zpkgsetup/tests/input2/collection/DEPENDENCIES.cfg	2005-11-18 09:17:55 UTC (rev 40204)
+++ zpkgtools/branches/philikon-toplevel-modules/zpkgsetup/tests/input2/collection/DEPENDENCIES.cfg	2005-11-18 09:18:48 UTC (rev 40205)
@@ -0,0 +1 @@
+module
\ No newline at end of file

Modified: zpkgtools/branches/philikon-toplevel-modules/zpkgsetup/tests/test_setup.py
===================================================================
--- zpkgtools/branches/philikon-toplevel-modules/zpkgsetup/tests/test_setup.py	2005-11-18 09:17:55 UTC (rev 40204)
+++ zpkgtools/branches/philikon-toplevel-modules/zpkgsetup/tests/test_setup.py	2005-11-18 09:18:48 UTC (rev 40205)
@@ -69,8 +69,17 @@
         #
         #context.packages.sort()
         #self.assertEqual(context.packages, ["package", "package2"])
-        
 
+    def test_modules(self):
+        input2 = os.path.join(os.path.dirname(__file__), "input2")
+        context = setup.SetupContext("collection", "0.0.0",
+                                     os.path.join(input2, "setup.py"))
+        context.initialize()
+        self.assertEqual(context.py_modules, ['module'])
+        self.assertEqual(context.package_dir[''], 'Modules')
 
 def test_suite():
     return unittest.makeSuite(SetupContextTestCase)
+
+if __name__ == '__main__':
+    unittest.main(defaultTest='test_suite')



More information about the zpkg mailing list