__init__.py 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. # __init__.py -- The tests for dulwich
  2. # Copyright (C) 2007 James Westby <jw+debian@jameswestby.net>
  3. #
  4. # This program is free software; you can redistribute it and/or
  5. # modify it under the terms of the GNU General Public License
  6. # as published by the Free Software Foundation; version 2
  7. # of the License or (at your option) any later version of
  8. # the License.
  9. #
  10. # This program is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. # GNU General Public License for more details.
  14. #
  15. # You should have received a copy of the GNU General Public License
  16. # along with this program; if not, write to the Free Software
  17. # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  18. # MA 02110-1301, USA.
  19. """Tests for Dulwich."""
  20. import unittest
  21. # XXX: Ideally we should allow other test runners as well,
  22. # but unfortunately unittest doesn't have a SkipTest/TestSkipped
  23. # exception.
  24. from nose import SkipTest as TestSkipped
  25. def test_suite():
  26. names = [
  27. 'client',
  28. 'file',
  29. 'index',
  30. 'lru_cache',
  31. 'objects',
  32. 'object_store',
  33. 'pack',
  34. 'protocol',
  35. 'repository',
  36. 'server',
  37. 'web',
  38. ]
  39. module_names = ['dulwich.tests.test_' + name for name in names]
  40. result = unittest.TestSuite()
  41. loader = unittest.TestLoader()
  42. suite = loader.loadTestsFromNames(module_names)
  43. result.addTests(suite)
  44. return result