예제 #1
0
파일: test.py 프로젝트: Stratoscale/upseto
 def test_packegg(self):
     case = self.pythonNamespacesTestcase()
     temp = tempfile.NamedTemporaryFile(suffix=".egg")
     upsetowrapper.packEgg(
         case.localRequiringProject,
         "--joinPythonNamespaces --entryPoint=test.py --output=%s" % temp.name,
         "py:%s/py" % case.localClone1.directory())
     upsetowrapper.runWhatever('/', "PYTHONPATH=%s python -m test" % temp.name)
예제 #2
0
파일: test.py 프로젝트: Stratoscale/upseto
 def test_packegg_replacesInitFileWithEmptyFile(self):
     case = self.pythonNamespacesTestcase()
     temp = tempfile.NamedTemporaryFile(suffix=".egg")
     upsetowrapper.packEgg(
         case.localRequiringProject,
         "--joinPythonNamespaces --entryPoint=test.py --output=%s" % temp.name,
         "py:%s/py" % case.localClone1.directory())
     with zipfile.ZipFile(temp.name) as z:
         for name in z.namelist():
             if name.endswith('__init__.py'):
                 contents = z.read(name).strip()
                 self.assertEqual(contents, "")