Пример #1
0
    def test_should_prompt_user_with_defaults(self, prompt, os):
        os.path.basename.return_value = 'project'
        collect_project_information()

        self.assertEqual(prompt.call_args_list,
                         [
                             call('Project name', 'project'),
                             call('Source directory', 'src/main/python'),
                             call('Unittest directory', 'src/unittest/python')
                         ])
Пример #2
0
    def test_should_prompt_user_with_defaults(self, prompt, os):
        os.path.basename.return_value = 'project'
        collect_project_information()

        self.assertEqual(prompt.call_args_list, [
            call('Project name', 'project'),
            call('Source directory', 'src/main/python'),
            call('Unittest directory', 'src/unittest/python'),
            call('Scripts directory', 'src/main/scripts'),
            call('Use plugin python.flake8 (Y/n)?', 'y'),
            call('Use plugin python.coverage (Y/n)?', 'y'),
            call('Use plugin python.distutils (Y/n)?', 'y')
        ])
    def test_should_prompt_user_with_defaults(self, prompt, os):
        os.path.basename.return_value = 'project'
        collect_project_information()

        self.assertEqual(prompt.call_args_list,
                         [
                             call('Project name', 'project'),
                             call('Source directory', 'src/main/python'),
                             call('Unittest directory', 'src/unittest/python'),
                             call('Scripts directory', 'src/main/scripts'),
                             call('Use plugin python.flake8 (Y/n)?', 'y'),
                             call('Use plugin python.coverage (Y/n)?', 'y'),
                             call('Use plugin python.distutils (Y/n)?', 'y')
                         ])
Пример #4
0
    def test_should_collect_scripts_dir(self, prompt, os):
        prompt.return_value = 'scripts'
        scaffolding = collect_project_information()

        self.assertEqual(scaffolding.dir_source_main_scripts, 'scripts')
Пример #5
0
    def test_should_collect_test_dir(self, prompt, os):
        prompt.return_value = 'test'
        scaffolding = collect_project_information()

        self.assertEqual(scaffolding.dir_source_unittest_python, 'test')
Пример #6
0
    def test_should_collect_project_name(self, prompt, os):
        prompt.return_value = 'project'
        scaffolding = collect_project_information()

        self.assertEqual(scaffolding.project_name, 'project')
Пример #7
0
    def test_should_collect_test_dir(self, prompt, os):
        prompt.return_value = 'test'
        scaffolding = collect_project_information()

        self.assertEqual(scaffolding.dir_source_unittest_python, 'test')
Пример #8
0
    def test_should_collect_project_name(self, prompt, os):
        prompt.return_value = 'project'
        scaffolding = collect_project_information()

        self.assertEqual(scaffolding.project_name, 'project')
    def test_should_collect_scripts_dir(self, prompt, os):
        prompt.return_value = 'scripts'
        scaffolding = collect_project_information()

        self.assertEqual(scaffolding.dir_source_main_scripts, 'scripts')