Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(121)  |  Call(121)  |  Derive(0)  |  Import(0)

src/q/u/quality_report-1.0/unittests/domain/product_tests.py   quality_report(Download)
    def dependencies(*args):
        ''' Return a set of fake dependencies. '''
        return set([('product', domain.Product(domain.Project()))])
 
 
    def setUp(self):  # pylint: disable=invalid-name
        self.__project = domain.Project('Organization', 'Project name')
        self.__product = domain.Product(self.__project, sonar_id='sonar:id', 
                                        old_sonar_ids={'old.version': 
                                                       'old-sonar:id'})
    def test_all_sonar_ids_unittests(self):
        ''' Test that for a product with unittests, the Sonar id of the 
            unit tests is included in the set of all Sonar ids. '''
        product = domain.Product(domain.Project(), sonar_id='sonar:id', 
                                 unittest_sonar_id='sonar:ut:id')
    def test_all_sonar_ids_jsf(self):
        ''' Test that for a product with jsf, the Sonar id of the jsf project
            is included in the set of all Sonar ids. '''
        project = domain.Project(())
        product = domain.Product(project, sonar_id='sonar:id',
    def test_birt_has_test_design(self):
        ''' Test that the product has a test design if Birt says so. '''
        project = domain.Project('Organization', 'Project name', 
                                 birt=FakeBirt(test_design=True))
        product = domain.Product(project)

src/q/u/quality_report-1.0/unittests/domain/measurement/metric_tests.py   quality_report(Download)
    def setUp(self):  # pylint: disable=C0103
        self.__subject = FakeSubject()
        self.__fake_tasks = FakeTasks()
        project = domain.Project(history=FakeHistory(), tasks=self.__fake_tasks)
        self.__metric = MetricUnderTest(self.__subject, project=project)
        subject = FakeSubject()
        subject.responsible_teams = lambda metric: 'Teams'
        project = domain.Project()
        self.assertEqual('Teams', MetricUnderTest(subject, 
                                  project=project).responsible_teams())
    def test_comment_from_wiki_url(self):
        ''' Test that the comment urls include a link to the Wiki if the Wiki
            has a comment on the metric. '''
        wiki = FakeWiki('Comment')
        project = domain.Project(history=FakeHistory(), wiki=wiki)
    def test_no_task_urls_without_issue_manager(self):
        ''' Test that the metric has no task urls when there's no issue 
            manager. '''
        project = domain.Project(history=FakeHistory())
        self.assertEqual({}, MetricUnderTest(self.__subject,
    def setUp(self):  # pylint: disable=C0103
        self.__subject = FakeSubject()
        project = domain.Project(history=FakeHistory())
        self.__metric = LowerIsBetterMetricUnderTest(self.__subject, 
                                                     project=project)

src/q/u/quality_report-1.0/unittests/domain/project_tests.py   quality_report(Download)
    def setUp(self):  # pylint: disable=C0103
        self.__project = domain.Project('Organization', 'Project Name')
 
    def test_name(self):
        ''' Test that the project has the correct name. '''
 
        sonar = FakeSonar()
        project = domain.Project('Organization', 'Project name', sonar=sonar)
        project.add_product(FakeProduct())
        project.analyse_products()
    def project(**kwargs):
        ''' Create a project with a default organization and project name and
            the passed keyword arguments. '''
        return domain.Project('Organization', 'Project', **kwargs)
 

src/q/u/quality_report-1.0/unittests/metric/product/size_metric_tests.py   quality_report(Download)
    def setUp(self):  # pylint: disable=invalid-name
        project = domain.Project(sonar=FakeSonar())
        self._metric = metric.ProductLOC(subject=FakeSubject(), project=project)
 
    def test_value(self):
    def setUp(self):  # pylint: disable=invalid-name
        self.__subject = FakeSubject()
        project = domain.Project(sonar=FakeSonar(), history=FakeHistory())
        self.__metric = metric.TotalLOC(subject=[self.__subject,
                                                 self.__subject],

src/q/u/quality_report-1.0/unittests/report_tests.py   quality_report(Download)
    def setUp(self):  # pylint: disable=invalid-name
        self.__project = domain.Project('organization', 'project title',
                                        sonar=FakeSonar())
        self.__report = report.QualityReport(self.__project)
 
    def __create_report(project_kwargs, team_kwargs, product_kwargs,
                        service_kwargs, number_of_teams=1):
        ''' Create the quality report. '''
        # pylint: disable=W0142
        project = domain.Project('organization', 'project', **project_kwargs)

src/q/u/quality_report-1.0/unittests/metric/ci_metric_tests.py   quality_report(Download)
    def setUp(self):  # pylint: disable=invalid-name
        ''' Create the text fixture. '''
        self._subject = None
        self._project = domain.Project(build_server=FakeJenkins())
        self._metric = metric.ProjectFailingCIJobs(subject=self._subject,
    def test_cant_be_measured_without_build_server(self):
        ''' Test that the metric cannot be measured without build server. '''
        project = domain.Project()
        for index in range(2):
            team = domain.Team('Team %d' % index)
    def setUp(self):  # pylint: disable=invalid-name
        ''' Create the text fixture. '''
        self._project = domain.Project(build_server=FakeJenkins())
        self._subject = domain.Team('Team')
        self._project.add_team(self._subject, responsible=True)
    def test_wont_be_measured_unless_multiple_teams(self):
        ''' Test that the metric won't be measured unless the project has 
            multiple teams. '''
        project = domain.Project(build_server=FakeJenkins())
        team = domain.Team('Single team')
    def test_cant_be_measured_without_build_server(self):
        ''' Test that the metric cannot be measured without build server. '''
        project = domain.Project()
        for index in range(2):
            team = domain.Team('Team %d' % index)

src/q/u/quality_report-1.0/unittests/metric/project/project_metric_tests.py   quality_report(Download)
    def setUp(self):  # pylint: disable=invalid-name
        self.__project = domain.Project(trello_risklog_board=FakeBoard())
        self.__metric = metric.RiskLog(project=self.__project)
 
    def test_url(self):
    def test_cant_be_measured_without_risklog(self):
        ''' Test that the risk log can't be measured if there is no Trello 
            board. '''
        project = domain.Project()
        self.failIf(metric.RiskLog.can_be_measured(project, project))
    def setUp(self):  # pylint: disable=invalid-name
        project = domain.Project(trello_risklog_board=UnreachableBoard())
        self.__metric = metric.RiskLog(project=project)
 
    def test_url(self):
    def setUp(self):  # pylint: disable=invalid-name
        self.__project = domain.Project(trello_actions_board=FakeBoard())
        self.__metric = metric.ActionActivity(project=self.__project)
 
    def test_value(self):
    def test_cant_be_measured(self):
        ''' Test that the metric can not be measured when the project has no 
            action list. '''
        project = domain.Project()
        self.failIf(metric.ActionActivity.can_be_measured(project, project))

src/q/u/quality_report-1.0/unittests/domain/measurement/metric_mixin_tests.py   quality_report(Download)
    def setUp(self):  # pylint: disable=invalid-name
        project = domain.Project(history=FakeHistory())
        subject = [DummyMetric(FakeSubject(), project=project)]
        self._metric = MetaMetricUnderTest(subject, project=project)
 

src/q/u/quality_report-1.0/unittests/metric/product/unittest_metric_tests.py   quality_report(Download)
    def setUp(self):  # pylint: disable=invalid-name
        self.__sonar = FakeSonar(line_coverage=89)
        project = domain.Project(sonar=self.__sonar)
        self._metric = metric.FailingUnittests(subject=FakeSubject(),
                                               project=project)
    def test_can_be_measured(self):
        ''' Test that the metric can be measured when the project has
            Sonar and the product has unit tests. '''
        product = FakeSubject(has_unittests=True)
        project = domain.Project(sonar=self.__sonar)
    def test_cant_be_measured_without_unittests(self):
        ''' Test that the metric can only be measured when the product has
            unit tests. '''
        product = FakeSubject(has_unittests=False)
        project = domain.Project(sonar=self.__sonar)
    def test_cant_be_measured_without_sonar(self):
        ''' Test that the metric can only be measured when the project has
            Sonar. '''
        product = FakeSubject(has_unittests=True)
        project = domain.Project()
    def setUp(self):  # pylint: disable=invalid-name
        self.__sonar = FakeSonar(line_coverage=89)
        project = domain.Project(sonar=self.__sonar)
        self._metric = metric.UnittestCoverage(subject=FakeSubject(),
                                               project=project)

src/q/u/quality_report-1.0/unittests/metric/metrix_source_mixin_tests.py   quality_report(Download)
    def test_can_be_measured(self):
        ''' Test that subclasses of the Sonar metric mixin can be measured
            when the project has Sonar. '''
        project = domain.Project(sonar='Sonar')
        product = domain.Product(project)
    def test_cant_be_measured_without_sonar(self):
        ''' Test that subclasses of the Sonar metric mixin can't be measured
            when the product has a Sonar id but the project has no Sonar. '''
        project = domain.Project()
        product = domain.Product(project)

  1 | 2 | 3  Next