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)
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, "")