Beispiel #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>'
        )
Beispiel #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')])
Beispiel #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>')])
Beispiel #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')])
Beispiel #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>')])
Beispiel #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')
Beispiel #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>')
Beispiel #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>')
        ])
Beispiel #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>')
Beispiel #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')
Beispiel #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>')
Beispiel #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>')])
Beispiel #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>')
Beispiel #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>')
Beispiel #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>')
Beispiel #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>'
        )