# HG changeset patch # User Augie Fackler # Date 1230075934 21600 # Node ID 46f6b872c9889da463a8543dc9135385799dee5d # Parent 1fde85a10f9e32af2bc1848c221d54734afa1ca6 tests: Fix some missing suite definitions so that running the full testsuite does not require installing nose. diff --git a/tests/run.py b/tests/run.py --- 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__': diff --git a/tests/test_diff.py b/tests/test_diff.py --- 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) diff --git a/tests/test_utility_commands.py b/tests/test_utility_commands.py --- 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)