Commits

rjollos  committed 48605ab

1.1.2dev: Merged [12448] from 1.0-stable. Refs #11443.

  • Participants
  • Parent commits 4869e0c
  • Branches trunk

Comments (0)

Files changed (49)

File trac/admin/tests/console.py

 
 
 def suite():
-    return unittest.makeSuite(TracadminTestCase, 'test')
+    return unittest.makeSuite(TracadminTestCase)
+
 
 if __name__ == '__main__':
-    unittest.main()
+    unittest.main(defaultTest='suite')

File trac/admin/tests/functional.py

         env = self._testenv.get_trac_environment()
         env.db_transaction("INSERT INTO permission VALUES (%s,%s)",
                            ('anonymous', 'MISSING_PERMISSION'))
-        self._testenv.restart()
+        env.config.touch()
+
         self._tester.go_to_admin("Permissions")
         tc.find('<span class="missing" '
                 'title="MISSING_PERMISSION is no longer defined">'

File trac/db/tests/api.py

 
 def suite():
     suite = unittest.TestSuite()
-    suite.addTest(unittest.makeSuite(ParseConnectionStringTestCase, 'test'))
-    suite.addTest(unittest.makeSuite(StringsTestCase, 'test'))
-    suite.addTest(unittest.makeSuite(ConnectionTestCase, 'test'))
-    suite.addTest(unittest.makeSuite(WithTransactionTest, 'test'))
+    suite.addTest(unittest.makeSuite(ParseConnectionStringTestCase))
+    suite.addTest(unittest.makeSuite(StringsTestCase))
+    suite.addTest(unittest.makeSuite(ConnectionTestCase))
+    suite.addTest(unittest.makeSuite(WithTransactionTest))
     return suite
 
 

File trac/db/tests/mysql_test.py

 
 def suite():
     suite = unittest.TestSuite()
-    suite.addTest(unittest.makeSuite(MySQLTableAlterationSQLTest, 'test'))
+    suite.addTest(unittest.makeSuite(MySQLTableAlterationSQLTest))
     return suite
 
 

File trac/db/tests/postgres_test.py

 
 def suite():
     suite = unittest.TestSuite()
-    suite.addTest(unittest.makeSuite(PostgresTableCreationSQLTest, 'test'))
-    suite.addTest(unittest.makeSuite(PostgresTableAlterationSQLTest, 'test'))
+    suite.addTest(unittest.makeSuite(PostgresTableCreationSQLTest))
+    suite.addTest(unittest.makeSuite(PostgresTableAlterationSQLTest))
     return suite
 
 

File trac/db/tests/util.py

 
 def suite():
     suite = unittest.TestSuite()
-    suite.addTest(unittest.makeSuite(SQLEscapeTestCase, 'test'))
+    suite.addTest(unittest.makeSuite(SQLEscapeTestCase))
     return suite
 
 if __name__ == '__main__':

File trac/mimeview/tests/api.py

 def suite():
     suite = unittest.TestSuite()
     suite.addTest(doctest.DocTestSuite(api))
-    suite.addTest(unittest.makeSuite(GetMimeTypeTestCase, 'test'))
-    suite.addTest(unittest.makeSuite(MimeviewTestCase, 'test'))
-    suite.addTest(unittest.makeSuite(GroupLinesTestCase, 'test'))
+    suite.addTest(unittest.makeSuite(GetMimeTypeTestCase))
+    suite.addTest(unittest.makeSuite(MimeviewTestCase))
+    suite.addTest(unittest.makeSuite(GroupLinesTestCase))
     return suite
 
 if __name__ == '__main__':

File trac/mimeview/tests/patch.py

 
 def suite():
     suite = unittest.TestSuite()
-    suite.addTest(unittest.makeSuite(PatchRendererTestCase, 'test'))
+    suite.addTest(unittest.makeSuite(PatchRendererTestCase))
     return suite
 
 if __name__ == '__main__':

File trac/mimeview/tests/pygments.py

 def suite():
     suite = unittest.TestSuite()
     if have_pygments:
-        suite.addTest(unittest.makeSuite(PygmentsRendererTestCase, 'test'))
+        suite.addTest(unittest.makeSuite(PygmentsRendererTestCase))
     else:
         print 'SKIP: mimeview/tests/pygments (no pygments installed)'
     return suite

File trac/tests/attachment.py

 
 def suite():
     suite = unittest.TestSuite()
-    suite.addTest(unittest.makeSuite(AttachmentTestCase, 'test'))
+    suite.addTest(unittest.makeSuite(AttachmentTestCase))
     return suite
 
 if __name__ == '__main__':

File trac/tests/config.py

 
 
 def suite():
-    return unittest.makeSuite(ConfigurationTestCase, 'test')
+    return unittest.makeSuite(ConfigurationTestCase)
 
 if __name__ == '__main__':
     unittest.main(defaultTest='suite')

File trac/tests/core.py

 
 
 def suite():
-    return unittest.makeSuite(ComponentTestCase, 'test')
+    return unittest.makeSuite(ComponentTestCase)
+
 
 if __name__ == '__main__':
-    unittest.main()
+    unittest.main(defaultTest='suite')

File trac/tests/env.py

 
 def suite():
     suite = unittest.TestSuite()
-    suite.addTest(unittest.makeSuite(EnvironmentTestCase, 'test'))
-    suite.addTest(unittest.makeSuite(EmptyEnvironmentTestCase, 'test'))
+    suite.addTest(unittest.makeSuite(EnvironmentTestCase))
+    suite.addTest(unittest.makeSuite(EmptyEnvironmentTestCase))
     return suite
 
 if __name__ == '__main__':

File trac/tests/functional/testcases.py

             # Remove the DeleteTicket plugin
             env.config.set('ticket', 'workflow', prevconfig)
             env.config.save()
-            self._testenv.restart()
             for ext in ('py', 'pyc', 'pyo'):
                 filename = os.path.join(self._testenv.tracdir, 'plugins',
                                         'DeleteTicket.%s' % ext)
         success = debug3.find("RegressionTestTicket3833 debug3") != -1
         if not success:
             # Ok, the testcase failed, but we really need logging enabled.
-            self._testenv.restart()
             env.log.debug("RegressionTestTicket3833 fixup3")
             fixup3 = traclogfile.read()
             message = 'Logging still off when it should have been on.\n' \
         raise Exception
 
 """)
-        self._testenv.restart()
 
         try:
             tc.go(self._tester.url + '/raise-exception')

File trac/tests/notification.py

 
 def suite():
     suite = unittest.TestSuite()
-    suite.addTest(unittest.makeSuite(SendmailEmailSenderTestCase, 'test'))
-    suite.addTest(unittest.makeSuite(SmtpEmailSenderTestCase, 'test'))
+    suite.addTest(unittest.makeSuite(SendmailEmailSenderTestCase))
+    suite.addTest(unittest.makeSuite(SmtpEmailSenderTestCase))
     return suite
 
 

File trac/tests/perm.py

         self.assertEqual(self.policy.results,
                          {('testuser', 'TEST_MODIFY'): True,
                           ('testuser', 'TEST_ADMIN'): None})
+
+
 def suite():
     suite = unittest.TestSuite()
-    suite.addTest(unittest.makeSuite(DefaultPermissionStoreTestCase, 'test'))
-    suite.addTest(unittest.makeSuite(PermissionSystemTestCase, 'test'))
-    suite.addTest(unittest.makeSuite(PermissionCacheTestCase, 'test'))
-    suite.addTest(unittest.makeSuite(PermissionPolicyTestCase, 'test'))
+    suite.addTest(unittest.makeSuite(DefaultPermissionStoreTestCase))
+    suite.addTest(unittest.makeSuite(PermissionSystemTestCase))
+    suite.addTest(unittest.makeSuite(PermissionCacheTestCase))
+    suite.addTest(unittest.makeSuite(PermissionPolicyTestCase))
     return suite
 
+
 if __name__ == '__main__':
-    unittest.main()
+    unittest.main(defaultTest='suite')

File trac/tests/resource.py

 def suite():
     suite = unittest.TestSuite()
     suite.addTest(doctest.DocTestSuite(resource))
-    suite.addTest(unittest.makeSuite(ResourceTestCase, 'test'))
+    suite.addTest(unittest.makeSuite(ResourceTestCase))
     suite.addTest(unittest.makeSuite(RenderResourceLinkTestCase, 'test'))
     return suite
 

File trac/ticket/tests/api.py

 
 
 def suite():
-    return unittest.makeSuite(TicketSystemTestCase, 'test')
+    return unittest.makeSuite(TicketSystemTestCase)
+
 
 if __name__ == '__main__':
-    unittest.main()
+    unittest.main(defaultTest='suite')

File trac/ticket/tests/batch.py

 
 def suite():
     suite = unittest.TestSuite()
-    suite.addTest(unittest.makeSuite(BatchModifyTestCase, 'test'))
+    suite.addTest(unittest.makeSuite(BatchModifyTestCase))
     return suite
 
 if __name__ == '__main__':

File trac/ticket/tests/conversion.py

 
 
 def suite():
-    return unittest.makeSuite(TicketConversionTestCase, 'test')
+    return unittest.makeSuite(TicketConversionTestCase)
+
 
 if __name__ == '__main__':
-    unittest.main()
+    unittest.main(defaultTest='suite')

File trac/ticket/tests/functional.py

         env.config.set('ticket-custom', 'newfield.format', '')
         env.config.save()
 
-        self._testenv.restart()
         val = "%s %s" % (random_unique_camel(), random_word())
         ticketid = self._tester.create_ticket(info={'newfield': val})
         self._tester.go_to_ticket(ticketid)
         env.config.set('ticket-custom', 'newfield.format', '')
         env.config.save()
 
-        self._testenv.restart()
         val = "%s %s" % (random_unique_camel(), random_word())
         ticketid = self._tester.create_ticket(info={'newfield': val})
         self._tester.go_to_ticket(ticketid)
         env.config.set('ticket-custom', 'newfield.format', 'wiki')
         env.config.save()
 
-        self._testenv.restart()
         word1 = random_unique_camel()
         word2 = random_word()
         val = "%s %s" % (word1, word2)
         env.config.set('ticket-custom', 'newfield.format', 'wiki')
         env.config.save()
 
-        self._testenv.restart()
         word1 = random_unique_camel()
         word2 = random_word()
         val = "%s %s" % (word1, word2)
         env.config.set('ticket-custom', 'newfield.format', 'reference')
         env.config.save()
 
-        self._testenv.restart()
         word1 = random_unique_camel()
         word2 = random_word()
         val = "%s %s" % (word1, word2)
         env.config.set('ticket-custom', 'newfield.format', 'list')
         env.config.save()
 
-        self._testenv.restart()
         word1 = random_unique_camel()
         word2 = random_word()
         val = "%s %s" % (word1, word2)
         env.config.set('ticket-custom', 'newfield.format', 'list')
         env.config.save()
 
-        self._testenv.restart()
         ticketid = self._tester.create_ticket()
         self._tester.go_to_ticket(ticketid)
 
         env.config.set('ticket-custom', 'custfield.label', 'Custom Field')
         env.config.save()
         try:
-            self._testenv.restart()
             self._tester.go_to_query()
             tc.find('<label>( |\\n)*<input[^<]*value="custfield"'
                     '[^<]*/>( |\\n)*Custom Field( |\\n)*</label>', 's')
             pass
             #env.config.set('ticket', 'restrict_owner', 'no')
             #env.config.save()
-            #self._testenv.restart()
 
 
 class RegressionTestTicket4447(FunctionalTwillTestCaseSetup):
         env.config.set('ticket-custom', 'newfield.label',
                        'Another Custom Field')
         env.config.save()
-        self._testenv.restart()
+
         self._tester.go_to_ticket(ticketid)
         self._tester.add_comment(ticketid)
         tc.notfind('<strong class="trac-field-newfield">Another Custom Field'
         env.config.set('ticket', 'restrict_owner', 'yes')
         env.config.save()
         try:
-            self._testenv.restart()
             # Make sure 'user' has logged in.
             self._tester.go_to_front()
             self._tester.logout()
             # regression test causes problems for later tests.
             env.config.set('ticket', 'restrict_owner', 'no')
             env.config.save()
-            self._testenv.restart()
 
 
 class RegressionTestTicket4630b(FunctionalTestCaseSetup):
         env = self._testenv.get_trac_environment()
         env.config.set('ticket', 'restrict_owner', 'yes')
         env.config.save()
-        self._testenv.restart()
 
         self._tester.go_to_front()
         self._tester.logout()
         env.config.save()
 
         try:
-            self._testenv.restart()
-
             ticket_id = self._tester.create_ticket("RegressionTestTicket6747")
             self._tester.go_to_ticket(ticket_id)
             tc.find("a_specified_owner")
                            'set_resolution')
             env.config.remove('ticket-workflow', 'resolve.set_owner')
             env.config.save()
-            self._testenv.restart()
 
 
 class RegressionTestTicket6879a(FunctionalTwillTestCaseSetup):
         env.config.set('query', 'default_query', default_query)
         env.config.save()
         try:
-            self._testenv.restart()
             self._tester.create_ticket('RegressionTestTicket7821 group')
             self._tester.go_to_query()
             # $USER
         finally:
             env.config.set('query', 'default_query', saved_default_query)
             env.config.save()
-            self._testenv.restart()
 
 
 class RegressionTestTicket7821var(FunctionalTwillTestCaseSetup):
         env.config.set('ticket', 'restrict_owner', 'no')
         env.config.save()
         try:
-            self._testenv.restart()
             self._tester.create_ticket('RegressionTestTicket7821 var')
             self._tester.go_to_query()
             # $USER in default_query
             env.config.set('query', 'default_query', saved_default_query)
             env.config.set('ticket', 'restrict_owner', saved_restrict_owner)
             env.config.save()
-            self._testenv.restart()
 
 
 class RegressionTestTicket8247(FunctionalTwillTestCaseSetup):
         env.config.set('components', 'trac.ticket.report.ReportModule',
                        'disabled')
         env.config.save()
-        self._testenv.restart()
+
         try:
             self._tester.go_to_view_tickets('query')
         finally:
             env.config.remove('components', 'trac.ticket.report.ReportModule')
             env.config.save()
-            self._testenv.restart()
 
 
 class RegressionTestTicket11176(FunctionalTestCaseSetup):

File trac/ticket/tests/model.py

 
 def suite():
     suite = unittest.TestSuite()
-    suite.addTest(unittest.makeSuite(TicketTestCase, 'test'))
-    suite.addTest(unittest.makeSuite(TicketCommentEditTestCase, 'test'))
-    suite.addTest(unittest.makeSuite(TicketCommentDeleteTestCase, 'test'))
-    suite.addTest(unittest.makeSuite(EnumTestCase, 'test'))
-    suite.addTest(unittest.makeSuite(MilestoneTestCase, 'test'))
-    suite.addTest(unittest.makeSuite(ComponentTestCase, 'test'))
-    suite.addTest(unittest.makeSuite(VersionTestCase, 'test'))
+    suite.addTest(unittest.makeSuite(TicketTestCase))
+    suite.addTest(unittest.makeSuite(TicketCommentEditTestCase))
+    suite.addTest(unittest.makeSuite(TicketCommentDeleteTestCase))
+    suite.addTest(unittest.makeSuite(EnumTestCase))
+    suite.addTest(unittest.makeSuite(MilestoneTestCase))
+    suite.addTest(unittest.makeSuite(ComponentTestCase))
+    suite.addTest(unittest.makeSuite(VersionTestCase))
     return suite
 
 if __name__ == '__main__':

File trac/ticket/tests/notification.py

         unittest.TestSuite.__init__(self)
         self.smtpd = SMTPThreadedServer(SMTP_TEST_PORT)
         self.smtpd.start()
-        self.addTest(unittest.makeSuite(NotificationTestCase, 'test'))
+        self.addTest(unittest.makeSuite(NotificationTestCase))
         self.remaining = self.countTestCases()
 
     def tear_down(self):
     return notifysuite
 
 if __name__ == '__main__':
-    unittest.TextTestRunner(verbosity=2).run(suite())
+    unittest.main(defaultTest='suite')

File trac/ticket/tests/query.py

 
 def suite():
     suite = unittest.TestSuite()
-    suite.addTest(unittest.makeSuite(QueryTestCase, 'test'))
-    suite.addTest(unittest.makeSuite(QueryLinksTestCase, 'test'))
-    suite.addTest(unittest.makeSuite(TicketQueryMacroTestCase, 'test'))
+    suite.addTest(unittest.makeSuite(QueryTestCase))
+    suite.addTest(unittest.makeSuite(QueryLinksTestCase))
+    suite.addTest(unittest.makeSuite(TicketQueryMacroTestCase))
     return suite
 
 if __name__ == '__main__':

File trac/ticket/tests/report.py

 def suite():
     suite = unittest.TestSuite()
     suite.addTest(doctest.DocTestSuite(trac.ticket.report))
-    suite.addTest(unittest.makeSuite(ReportTestCase, 'test'))
+    suite.addTest(unittest.makeSuite(ReportTestCase))
     return suite
 
 if __name__ == '__main__':

File trac/ticket/tests/roadmap.py

 
 def suite():
     suite = unittest.TestSuite()
-    suite.addTest(unittest.makeSuite(TicketGroupStatsTestCase, 'test'))
-    suite.addTest(unittest.makeSuite(DefaultTicketGroupStatsProviderTestCase,
-                                      'test'))
+    suite.addTest(unittest.makeSuite(TicketGroupStatsTestCase))
+    suite.addTest(unittest.makeSuite(DefaultTicketGroupStatsProviderTestCase))
     return suite
 
 if __name__ == '__main__':

File trac/util/tests/__init__.py

 
 def suite():
     suite = unittest.TestSuite()
-    suite.addTest(unittest.makeSuite(AtomicFileTestCase, 'test'))
-    suite.addTest(unittest.makeSuite(PathTestCase, 'test'))
-    suite.addTest(unittest.makeSuite(RandomTestCase, 'test'))
-    suite.addTest(unittest.makeSuite(ContentDispositionTestCase, 'test'))
-    suite.addTest(unittest.makeSuite(SafeReprTestCase, 'test'))
+    suite.addTest(unittest.makeSuite(AtomicFileTestCase))
+    suite.addTest(unittest.makeSuite(PathTestCase))
+    suite.addTest(unittest.makeSuite(RandomTestCase))
+    suite.addTest(unittest.makeSuite(ContentDispositionTestCase))
+    suite.addTest(unittest.makeSuite(SafeReprTestCase))
     suite.addTest(concurrency.suite())
     suite.addTest(datefmt.suite())
     suite.addTest(presentation.suite())

File trac/util/tests/concurrency.py

 
 def suite():
     suite = unittest.TestSuite()
-    suite.addTest(unittest.makeSuite(ThreadLocalTestCase, 'test'))
+    suite.addTest(unittest.makeSuite(ThreadLocalTestCase))
     return suite
 
 if __name__ == '__main__':

File trac/util/tests/datefmt.py

 def suite():
     suite = unittest.TestSuite()
     if PytzTestCase:
-        suite.addTest(unittest.makeSuite(PytzTestCase, 'test'))
+        suite.addTest(unittest.makeSuite(PytzTestCase))
     else:
         print "SKIP: utils/tests/datefmt.py (no pytz installed)"
     suite.addTest(unittest.makeSuite(DateFormatTestCase))
     suite.addTest(unittest.makeSuite(UTimestampTestCase))
     suite.addTest(unittest.makeSuite(ISO8601TestCase))
     if I18nDateFormatTestCase:
-        suite.addTest(unittest.makeSuite(I18nDateFormatTestCase, 'test'))
+        suite.addTest(unittest.makeSuite(I18nDateFormatTestCase))
     else:
         print "SKIP: utils/tests/datefmt.py (no babel installed)"
     suite.addTest(unittest.makeSuite(ParseISO8601TestCase))

File trac/util/tests/html.py

 
 def suite():
     suite = unittest.TestSuite()
-    suite.addTest(unittest.makeSuite(TracHTMLSanitizerTestCase, 'test'))
-    suite.addTest(unittest.makeSuite(FindElementTestCase, 'test'))
-    suite.addTest(unittest.makeSuite(ToFragmentTestCase, 'test'))
+    suite.addTest(unittest.makeSuite(TracHTMLSanitizerTestCase))
+    suite.addTest(unittest.makeSuite(FindElementTestCase))
+    suite.addTest(unittest.makeSuite(ToFragmentTestCase))
     return suite
 
 

File trac/util/tests/text.py

 
 def suite():
     suite = unittest.TestSuite()
-    suite.addTest(unittest.makeSuite(ToUnicodeTestCase, 'test'))
-    suite.addTest(unittest.makeSuite(ExpandtabsTestCase, 'test'))
-    suite.addTest(unittest.makeSuite(UnicodeQuoteTestCase, 'test'))
-    suite.addTest(unittest.makeSuite(JavascriptQuoteTestCase, 'test'))
-    suite.addTest(unittest.makeSuite(ToJsStringTestCase, 'test'))
-    suite.addTest(unittest.makeSuite(QuoteQueryStringTestCase, 'test'))
-    suite.addTest(unittest.makeSuite(WhitespaceTestCase, 'test'))
-    suite.addTest(unittest.makeSuite(TextWidthTestCase, 'test'))
-    suite.addTest(unittest.makeSuite(PrintTableTestCase, 'test'))
-    suite.addTest(unittest.makeSuite(WrapTestCase, 'test'))
-    suite.addTest(unittest.makeSuite(FixEolTestCase, 'test'))
-    suite.addTest(unittest.makeSuite(UnicodeBase64TestCase, 'test'))
-    suite.addTest(unittest.makeSuite(StripwsTestCase, 'test'))
-    suite.addTest(unittest.makeSuite(LevenshteinDistanceTestCase, 'test'))
-    suite.addTest(unittest.makeSuite(SubVarsTestCase, 'test'))
-    suite.addTest(unittest.makeSuite(ShortenLineTestCase, 'test'))
+    suite.addTest(unittest.makeSuite(ToUnicodeTestCase))
+    suite.addTest(unittest.makeSuite(ExpandtabsTestCase))
+    suite.addTest(unittest.makeSuite(UnicodeQuoteTestCase))
+    suite.addTest(unittest.makeSuite(JavascriptQuoteTestCase))
+    suite.addTest(unittest.makeSuite(ToJsStringTestCase))
+    suite.addTest(unittest.makeSuite(QuoteQueryStringTestCase))
+    suite.addTest(unittest.makeSuite(WhitespaceTestCase))
+    suite.addTest(unittest.makeSuite(TextWidthTestCase))
+    suite.addTest(unittest.makeSuite(PrintTableTestCase))
+    suite.addTest(unittest.makeSuite(WrapTestCase))
+    suite.addTest(unittest.makeSuite(FixEolTestCase))
+    suite.addTest(unittest.makeSuite(UnicodeBase64TestCase))
+    suite.addTest(unittest.makeSuite(StripwsTestCase))
+    suite.addTest(unittest.makeSuite(LevenshteinDistanceTestCase))
+    suite.addTest(unittest.makeSuite(SubVarsTestCase))
+    suite.addTest(unittest.makeSuite(ShortenLineTestCase))
     return suite
 
 if __name__ == '__main__':

File trac/util/tests/translation.py

 
 def suite():
     suite = unittest.TestSuite()
-    suite.addTest(unittest.makeSuite(TranslationsProxyTestCase, 'test'))
+    suite.addTest(unittest.makeSuite(TranslationsProxyTestCase))
     return suite
 
 if __name__ == '__main__':

File trac/versioncontrol/tests/api.py

 
 def suite():
     suite = unittest.TestSuite()
-    suite.addTest(unittest.makeSuite(ApiTestCase, 'test'))
-    suite.addTest(unittest.makeSuite(ResourceManagerTestCase, 'test'))
+    suite.addTest(unittest.makeSuite(ApiTestCase))
+    suite.addTest(unittest.makeSuite(ResourceManagerTestCase))
     return suite
 
 
 if __name__ == '__main__':
-    unittest.main()
+    unittest.main(defaultTest='suite')

File trac/versioncontrol/tests/cache.py

 
 
 def suite():
-    return unittest.makeSuite(CacheTestCase, 'test')
+    return unittest.makeSuite(CacheTestCase)
+
 
 if __name__ == '__main__':
-    unittest.main()
+    unittest.main(defaultTest='suite')

File trac/versioncontrol/tests/diff.py

                          'aa<ins>x</ins>b')
 
 def suite():
-    return unittest.makeSuite(DiffTestCase, 'test')
+    return unittest.makeSuite(DiffTestCase)
 
 if __name__ == '__main__':
     unittest.main()

File trac/versioncontrol/tests/svn_authz.py

 
 def suite():
     suite = unittest.TestSuite()
-    suite.addTest(unittest.makeSuite(AuthzParserTestCase, 'test'))
-    suite.addTest(unittest.makeSuite(AuthzSourcePolicyTestCase, 'test'))
+    suite.addTest(unittest.makeSuite(AuthzParserTestCase))
+    suite.addTest(unittest.makeSuite(AuthzSourcePolicyTestCase))
     return suite
 
 
 if __name__ == '__main__':
-    runner = unittest.TextTestRunner()
-    runner.run(suite())
-
+    unittest.main(defaultTest='suite')

File trac/web/tests/api.py

 
 def suite():
     suite = unittest.TestSuite()
-    suite.addTest(unittest.makeSuite(RequestTestCase, 'test'))
-    suite.addTest(unittest.makeSuite(ParseArgListTestCase, 'test'))
+    suite.addTest(unittest.makeSuite(RequestTestCase))
+    suite.addTest(unittest.makeSuite(ParseArgListTestCase))
     return suite
 
+
 if __name__ == '__main__':
-    unittest.main()
+    unittest.main(defaultTest='suite')

File trac/web/tests/auth.py

 
 def suite():
     suite = unittest.TestSuite()
-    suite.addTest(unittest.makeSuite(LoginModuleTestCase, 'test'))
-    suite.addTest(unittest.makeSuite(BasicAuthenticationTestCase, 'test'))
+    suite.addTest(unittest.makeSuite(LoginModuleTestCase))
+    suite.addTest(unittest.makeSuite(BasicAuthenticationTestCase))
     return suite
 
+
 if __name__ == '__main__':
-    unittest.main()
+    unittest.main(defaultTest='suite')

File trac/web/tests/cgi_frontend.py

 
 
 def suite():
-    return unittest.makeSuite(CGIRequestTestCase, 'test')
+    return unittest.makeSuite(CGIRequestTestCase)
+
 
 if __name__ == '__main__':
-    unittest.main()
+    unittest.main(defaultTest='suite')

File trac/web/tests/chrome.py

 
 def suite():
     suite = unittest.TestSuite()
-    suite.addTest(unittest.makeSuite(ChromeTestCase, 'test'))
-    suite.addTest(unittest.makeSuite(ChromeTestCase2, 'test'))
+    suite.addTest(unittest.makeSuite(ChromeTestCase))
+    suite.addTest(unittest.makeSuite(ChromeTestCase2))
     return suite
 
 if __name__ == '__main__':

File trac/web/tests/href.py

 def suite():
     suite = unittest.TestSuite()
     suite.addTest(doctest.DocTestSuite(trac.web.href))
-    suite.addTest(unittest.makeSuite(HrefTestCase, 'test'))
+    suite.addTest(unittest.makeSuite(HrefTestCase))
     return suite
 
 if __name__ == '__main__':

File trac/web/tests/main.py

 
 def suite():
     suite = unittest.TestSuite()
-    suite.addTest(unittest.makeSuite(AuthenticateTestCase, 'test'))
-    suite.addTest(unittest.makeSuite(EnvironmentsTestCase, 'test'))
+    suite.addTest(unittest.makeSuite(AuthenticateTestCase))
+    suite.addTest(unittest.makeSuite(EnvironmentsTestCase))
     return suite
 
 

File trac/web/tests/session.py

 
 
 def suite():
-    return unittest.makeSuite(SessionTestCase, 'test')
+    return unittest.makeSuite(SessionTestCase)
 
 
 if __name__ == '__main__':
-    unittest.main()
+    unittest.main(defaultTest='suite')

File trac/wiki/tests/model.py

 
 
 def suite():
-    return unittest.makeSuite(WikiPageTestCase, 'test')
+    return unittest.makeSuite(WikiPageTestCase)
 
 if __name__ == '__main__':
     unittest.main(defaultTest='suite')

File tracopt/mimeview/tests/php.py

     suite = unittest.TestSuite()
     php = locate("php")
     if php:
-        suite.addTest(unittest.makeSuite(PhpDeuglifierTestCase, 'test'))
-        suite.addTest(unittest.makeSuite(PhpRendererTestCase, 'test'))
+        suite.addTest(unittest.makeSuite(PhpDeuglifierTestCase))
+        suite.addTest(unittest.makeSuite(PhpRendererTestCase))
     else:
         print("SKIP: tracopt/mimeview/tests/php.py (php cli binary, 'php', "
               "not found)")

File tracopt/perm/tests/authz_policy.py

 def suite():
     suite = unittest.TestSuite()
     if ConfigObj:
-        suite.addTest(unittest.makeSuite(AuthzPolicyTestCase, 'test'))
+        suite.addTest(unittest.makeSuite(AuthzPolicyTestCase))
     else:
         print "SKIP: tracopt/perm/tests/authz_policy.py (no configobj " + \
               "installed)"

File tracopt/ticket/tests/commit_updater.py

 
 def suite():
     suite = unittest.TestSuite()
-    suite.addTest(unittest.makeSuite(CommitTicketUpdaterTestCase, 'test'))
+    suite.addTest(unittest.makeSuite(CommitTicketUpdaterTestCase))
     return suite
 
 

File tracopt/versioncontrol/git/tests/PyGIT.py

     suite = unittest.TestSuite()
     git = locate("git")
     if git:
-        suite.addTest(unittest.makeSuite(GitTestCase, 'test'))
-        suite.addTest(unittest.makeSuite(TestParseCommit, 'test'))
-        suite.addTest(unittest.makeSuite(NormalTestCase, 'test'))
+        suite.addTest(unittest.makeSuite(GitTestCase))
+        suite.addTest(unittest.makeSuite(TestParseCommit))
+        suite.addTest(unittest.makeSuite(NormalTestCase))
         if os.name != 'nt':
             # Popen doesn't accept unicode path and arguments on Windows
-            suite.addTest(unittest.makeSuite(UnicodeNameTestCase, 'test'))
+            suite.addTest(unittest.makeSuite(UnicodeNameTestCase))
     else:
         print("SKIP: tracopt/versioncontrol/git/tests/PyGIT.py (git cli "
               "binary, 'git', not found)")

File tracopt/versioncontrol/svn/tests/svn_fs.py

     return suite
 
 if __name__ == '__main__':
-    runner = unittest.TextTestRunner()
-    runner.run(suite())
+    unittest.main(defaultTest='suite')