Exemplo n.º 1
0
 def test_archive_file(self):
     builder = Builder('test.zip')
     builder._archive_file(
         self.zipfile, os.path.join(self.pj_root, 'setup.py'))
     ok_(isinstance(self.zipfile.getinfo('setup.pyc'), zipfile.ZipInfo))
     builder._archive_file(
         self.zipfile, os.path.join(self.pj_root, 'README.md'))
     ok_(isinstance(self.zipfile.getinfo('README.md'), zipfile.ZipInfo))
Exemplo n.º 2
0
 def test_archive_single_file(self):
     self._single_file = True
     builder = Builder('test.zip', single_file=True)
     builder._archive_file(
         self.zipfile, os.path.join(self.pj_root, 'setup.py'))
     ok_(isinstance(self.zipfile.getinfo('setup.py'), zipfile.ZipInfo))