[MERGE/RFC] Better unicode symlinks handling
John Arbash Meinel
john at arbash-meinel.com
Tue May 5 18:03:05 BST 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
...
> jam> +def load_tests(basic_tests, module, loader):
> jam> + suite = loader.suiteClass()
> jam> + dir_reader_tests, remaining_tests = tests.split_suite_by_condition(
> jam> + basic_tests, tests.condition_isinstance(TestCaseWithDirState))
> jam> + tests.multiply_tests(dir_reader_tests,
> jam> + test_osutils.dir_reader_scenarios(), suite)
> jam> + suite.addTest(remaining_tests)
> jam> + return suite
> jam> +
> jam> +
>
> jam> ^- this sure looks like a second test multiplication over the
> jam> same tests.
> jam> (everything subclassing TestCaseWithDirState). Perhaps not, though.
>
> I don't understand the 'second' here :-/
>
> - multiply_tests parametrize TestCaseWithDirState tests against the dir readers.
>
=== modified file 'bzrlib/tests/test__dirstate_helpers.py'
...
+def load_tests(basic_tests, module, loader):
...
+ dir_reader_tests, remaining_tests = tests.split_suite_by_condition(
+ remaining_tests, tests.condition_isinstance(
+ test_dirstate.TestCaseWithDirState))
+ tests.multiply_tests(dir_reader_tests, dir_reader_scenarios, suite)
+ suite.addTest(remaining_tests)
+
+ return suite
+
+
- - one
=== modified file 'bzrlib/tests/test_dirstate.py'
- --- bzrlib/tests/test_dirstate.py 2009-04-17 14:03:32 +0000
+++ bzrlib/tests/test_dirstate.py 2009-04-17 14:59:33 +0000
@@ -44,9 +44,39 @@
# set_path_id setting id when state is in memory modified
+def load_tests(basic_tests, module, loader):
+ suite = loader.suiteClass()
+ dir_reader_tests, remaining_tests = tests.split_suite_by_condition(
+ basic_tests, tests.condition_isinstance(TestCaseWithDirState))
+ tests.multiply_tests(dir_reader_tests,
+ test_osutils.dir_reader_scenarios(), suite)
+ suite.addTest(remaining_tests)
+ return suite
+
- - two
I'm guessing they are multiplying different tests, and both sides are
using TestCaseWithDirstate as a convenient base. But the condition at
least looks identical.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkoAcUkACgkQJdeBCYSNAAP3awCdGh1WW5Q4Kvv4wx7CVd+uWvxG
w1EAoMHmBC+arn+QcVXUnPWYbZnXqPNG
=ccHB
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list