示例#1
0
class TestCreateCommand(BaseSeedTest):
    def setUp(self):
        super(TestCreateCommand, self).setUp()
        self.cmd = CreateCommand()

    def test_dry_run(self):
        self.cmd.main(args=['--dry-run'], initial_options={})
        self.assertEqual(os.listdir(self.pkg_dir), [])

    def test_no_args(self):
        self.cmd.main(args=[], initial_options={})
        self.assertEqual(
            set(os.listdir(self.pkg_dir)),
            set([
                'bin',
                'CHANGES.txt',
                'LICENSE.txt',
                'MANIFEST.in',
                'README.rst',
                'setup.py',
                'testpkg',
                'docs',
            ]))
        self.assertEqual(os.listdir(os.path.join(self.pkg_dir, 'testpkg')), [
            '__init__.py',
        ])
示例#2
0
class TestCreateCommand(BaseSeedTest):

    def setUp(self):
        super(TestCreateCommand, self).setUp()
        self.cmd = CreateCommand()

    def test_dry_run(self):
        self.cmd.main(
            args=['--dry-run'],
            initial_options={}
        )
        self.assertEqual(os.listdir(self.pkg_dir), [])

    def test_no_args(self):
        self.cmd.main(
            args=[],
            initial_options={}
        )
        self.assertEqual(set(os.listdir(self.pkg_dir)), set([
            'bin',
            'CHANGES.txt',
            'LICENSE.txt',
            'MANIFEST.in',
            'README.rst',
            'setup.py',
            'testpkg',
            'docs',
            'VERSION',
        ]))
        self.assertEqual(os.listdir(os.path.join(self.pkg_dir, 'testpkg')), [
            '__init__.py',
        ])
示例#3
0
 def create_package(self, *args):
     CreateCommand().main(
         args=list(args),
         initial_options={}
     )
     os.system('git init .')
     os.system('git add .')
     os.system('git commit -m "Initial commit"')
     os.system('python setup.py develop')
示例#4
0
 def setUp(self):
     super(TestCreateCommand, self).setUp()
     self.cmd = CreateCommand()
示例#5
0
 def setUp(self):
     super(TestCreateCommand, self).setUp()
     self.cmd = CreateCommand()