示例#1
0
    def test_should_render_minimal_task_list_when_in_quiet_mode(
            self, print_text_line):
        print_list_of_tasks(self.mock_reactor, quiet=True)

        print_text_line.assert_called_with(
            'task-1:<no description available>\ntask-2:<no description available>'
        )
示例#2
0
    def test_should_render_verbose_task_list_with_descriptions(self, print_text_line):
        self.task_1.description = ["any", "description", "for", "task", "1"]
        self.task_2.description = ["any", "description", "for", "task", "2"]

        print_list_of_tasks(self.mock_reactor, quiet=False)

        print_text_line.assert_has_calls([call('Tasks found for project "any-project-name":'),
                                          call('    task-1 - any description for task 1'),
                                          call('    task-2 - any description for task 2')])
示例#3
0
    def test_should_render_verbose_task_list_with_dependencies(self, print_text_line):
        self.task_1.dependencies = ["any-dependency", "any-other-dependency"]

        print_list_of_tasks(self.mock_reactor, quiet=False)

        print_text_line.assert_has_calls([call('Tasks found for project "any-project-name":'),
                                          call('    task-1 - <no description available>'),
                                          call('             depends on tasks: any-dependency any-other-dependency'),
                                          call('    task-2 - <no description available>')])
示例#4
0
    def test_should_render_verbose_task_list_with_descriptions(self, print_text_line):
        self.task_1.description = ["any", "description", "for", "task", "1"]
        self.task_2.description = ["any", "description", "for", "task", "2"]

        print_list_of_tasks(self.mock_reactor, quiet=False)

        print_text_line.assert_has_calls([call('Tasks found for project "any-project-name":'),
                                          call('    task-1 - any description for task 1'),
                                          call('    task-2 - any description for task 2')])
示例#5
0
    def test_should_render_verbose_task_list_with_dependencies(self, print_text_line):
        self.task_1.dependencies = ["any-dependency", "any-other-dependency"]

        print_list_of_tasks(self.mock_reactor, quiet=False)

        print_text_line.assert_has_calls([call('Tasks found for project "any-project-name":'),
                                          call('    task-1 - <no description available>'),
                                          call('             depends on tasks: any-dependency any-other-dependency'),
                                          call('    task-2 - <no description available>')])
示例#6
0
    def test_should_render_verbose_task_list_with_descriptions(self):
        self.task_1.description = ["any", "description", "for", "task", "1"]
        self.task_2.description = ["any", "description", "for", "task", "2"]

        print_list_of_tasks(self.mock_reactor, quiet=False)

        verify(pybuilder.cli).print_text_line('Tasks found for project "any-project-name":')
        verify(pybuilder.cli).print_text_line('    task-1 - any description for task 1')
        verify(pybuilder.cli).print_text_line('    task-2 - any description for task 2')
示例#7
0
    def test_should_render_verbose_task_list_with_dependencies(self):
        self.task_1.dependencies = ["any-dependency", "any-other-dependency"]

        print_list_of_tasks(self.mock_reactor, quiet=False)

        verify(pybuilder.cli).print_text_line('Tasks found for project "any-project-name":')
        verify(pybuilder.cli).print_text_line('    task-1 - <no description available>')
        verify(pybuilder.cli).print_text_line('             depends on tasks: any-dependency any-other-dependency')
        verify(pybuilder.cli).print_text_line('    task-2 - <no description available>')
示例#8
0
    def test_should_render_verbose_task_list_without_descriptions_and_dependencies(
            self, print_text_line):
        print_list_of_tasks(self.mock_reactor, quiet=False)

        print_text_line.assert_has_calls([
            call('Tasks found for project "any-project-name":'),
            call('    task-1 - <no description available>'),
            call('    task-2 - <no description available>')
        ])
示例#9
0
    def test_should_render_verbose_task_list_without_descriptions_and_dependencies(
            self):
        print_list_of_tasks(self.mock_reactor, quiet=False)

        verify(pybuilder.cli).print_text_line(
            'Tasks found for project "any-project-name":')
        verify(pybuilder.cli).print_text_line(
            '    task-1 - <no description available>')
        verify(pybuilder.cli).print_text_line(
            '    task-2 - <no description available>')
示例#10
0
    def test_should_render_verbose_task_list_with_descriptions(self):
        self.task_1.description = ["any", "description", "for", "task", "1"]
        self.task_2.description = ["any", "description", "for", "task", "2"]

        print_list_of_tasks(self.mock_reactor, quiet=False)

        verify(pybuilder.cli).print_text_line(
            'Tasks found for project "any-project-name":')
        verify(pybuilder.cli).print_text_line(
            '    task-1 - any description for task 1')
        verify(pybuilder.cli).print_text_line(
            '    task-2 - any description for task 2')
示例#11
0
    def test_should_render_verbose_task_list_with_dependencies(self):
        self.task_1.dependencies = ["any-dependency", "any-other-dependency"]

        print_list_of_tasks(self.mock_reactor, quiet=False)

        verify(pybuilder.cli).print_text_line(
            'Tasks found for project "any-project-name":')
        verify(pybuilder.cli).print_text_line(
            '    task-1 - <no description available>')
        verify(pybuilder.cli).print_text_line(
            '             depends on tasks: any-dependency any-other-dependency'
        )
        verify(pybuilder.cli).print_text_line(
            '    task-2 - <no description available>')
示例#12
0
    def test_should_render_verbose_task_list_without_descriptions_and_dependencies(self, print_text_line):
        print_list_of_tasks(self.mock_reactor, quiet=False)

        print_text_line.assert_has_calls([call('Tasks found for project "any-project-name":'),
                                          call('    task-1 - <no description available>'),
                                          call('    task-2 - <no description available>')])
示例#13
0
    def test_should_render_minimal_task_list_when_in_quiet_mode(self, print_text_line):
        print_list_of_tasks(self.mock_reactor, quiet=True)

        print_text_line.assert_called_with('task-1:<no description available>\ntask-2:<no description available>')
示例#14
0
    def test_should_render_verbose_task_list_without_descriptions_and_dependencies(self):
        print_list_of_tasks(self.mock_reactor, quiet=False)

        verify(pybuilder.cli).print_text_line('Tasks found for project "any-project-name":')
        verify(pybuilder.cli).print_text_line('    task-1 - <no description available>')
        verify(pybuilder.cli).print_text_line('    task-2 - <no description available>')
示例#15
0
    def test_should_render_minimal_task_list_when_in_quiet_mode(self):
        print_list_of_tasks(self.mock_reactor, quiet=True)

        verify(pybuilder.cli).print_text_line('task-1:<no description available>\ntask-2:<no description available>')
示例#16
0
    def test_should_render_minimal_task_list_when_in_quiet_mode(self):
        print_list_of_tasks(self.mock_reactor, quiet=True)

        verify(pybuilder.cli).print_text_line(
            'task-1:<no description available>\ntask-2:<no description available>'
        )