def get_slow_tests_for_project(self, project, start_period, end_period):
        latest_build = Build.query.filter(
            Build.project == project,
            Build.status == Status.finished,
            Build.result == Result.passed,
            Build.date_created >= start_period,
            Build.date_created < end_period,
        ).order_by(
            Build.date_created.desc(),
        ).limit(1).first()

        if not latest_build:
            return []

        job_list = list(latest_build.jobs)
        if not job_list:
            return []

        queryset = TestCase.query.filter(
            TestCase.job_id.in_(j.id for j in job_list),
            TestCase.result == Result.passed,
            TestCase.date_created > start_period,
            TestCase.date_created <= end_period,
        ).order_by(
            TestCase.duration.desc()
        ).limit(MAX_SLOW_TESTS)

        slow_list = []
        for test in queryset:
            slow_list.append({
                'project': project,
                'name': test.short_name,
                'package': test.package,
                'duration': (test.duration / 1000.0,) % '%.2f s',
                'duration_raw': test.duration,
                'link': build_uri('/project_test/{0}/{1}/'.format(
                    project.id.hex, test.name_sha)),
            })

        return slow_list
dataset/ETHPy150Open dropbox/changes/changes/reports/build.py/BuildReport.get_slow_tests_for_project/swapped operands of `%`