コード例 #1
0
 def test_process(self):
     """ Test that the report has two sections when we add a process:
         one for the process itself, and one for meta metrics. """
     project = domain.Project()
     project.add_process(
         domain.Process(short_name='FP',
                        requirements=[requirement.TrackActions]))
     self.assertEqual(2, len(report.QualityReport(project).sections()))
コード例 #2
0
 def test_get_process(self):
     """ Test that a process can be retrieved by name. """
     process = domain.Process(name="Scrum")
     self.__project.add_process(process)
     self.assertEqual(process, self.__project.get_process(process.name()))
コード例 #3
0
 def test_add_process(self):
     """ Test that a process can be added to the project ."""
     process = domain.Process(name="Scrum")
     self.__project.add_process(process)
     self.assertEqual([process], self.__project.processes())
コード例 #4
0
 def __create_process(process_kwargs):  # pylint: disable=unused-argument
     """ Create a process according to the provided arguments. """
     return domain.Process(**process_kwargs)
コード例 #5
0
 def test_short_name_can_be_overridden(self):
     """ Test that the process short name can be overridden. """
     self.assertEqual("ZZ", domain.Process(short_name="ZZ").short_name())
コード例 #6
0
 def test_default_short_name(self):
     """ Test that the process has a default short name. """
     self.assertEqual("PP", domain.Process().short_name())
コード例 #7
0
 def test_name_can_be_overridden(self):
     """ Test that the process name can be overridden. """
     self.assertEqual("Development process",
                      domain.Process(name="Development process").name())