Mercurial > hgsubversion
changeset 153:46f6b872c988
tests: Fix some missing suite definitions so that running the full testsuite
does not require installing nose.
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Tue, 23 Dec 2008 17:45:34 -0600 |
parents | 1fde85a10f9e |
children | 6fa97cfbf62f |
files | tests/run.py tests/test_diff.py tests/test_utility_commands.py |
diffstat | 3 files changed, 20 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/run.py +++ b/tests/run.py @@ -4,6 +4,7 @@ import unittest sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +import test_diff import test_fetch_branches import test_fetch_command import test_fetch_command_regexes @@ -16,9 +17,11 @@ import test_push_renames import test_push_dirs import test_push_eol import test_tags +import test_utility_commands def suite(): - return unittest.TestSuite([test_fetch_branches.suite(), + return unittest.TestSuite([test_diff.suite(), + test_fetch_branches.suite(), test_fetch_command.suite(), test_fetch_command_regexes.suite(), test_fetch_exec.suite(), @@ -30,6 +33,7 @@ def suite(): test_push_dirs.suite(), test_push_eol.suite(), test_tags.suite(), + test_utility_commands.suite(), ]) if __name__ == '__main__':
--- a/tests/test_diff.py +++ b/tests/test_diff.py @@ -1,3 +1,5 @@ +import unittest + from mercurial import ui import diff_cmd @@ -32,3 +34,9 @@ class DiffTests(test_util.TestBase): u = ui.ui() diff_cmd.diff_command(u, self.repo, self.wc_path) self.assertEqual(u.stream.getvalue(), expected_diff_output) + + +def suite(): + all = [unittest.TestLoader().loadTestsFromTestCase(DiffTests), + ] + return unittest.TestSuite(all)
--- a/tests/test_utility_commands.py +++ b/tests/test_utility_commands.py @@ -1,4 +1,5 @@ import os +import unittest import urllib # for url quoting from mercurial import ui @@ -91,3 +92,9 @@ class UtilityTests(test_util.TestBase): utility_commands.print_wc_url(u, self.repo, self.wc_path) expected = 'file://%s\n' % urllib.quote(self.repo_path) self.assertEqual(u.stream.getvalue(), expected) + + +def suite(): + all = [unittest.TestLoader().loadTestsFromTestCase(UtilityTests), + ] + return unittest.TestSuite(all)