[rfc] question about tests in blackbox/test_diff.py
bialix at ukr.net
Thu Dec 7 17:26:33 GMT 2006
-----BEGIN PGP SIGNED MESSAGE-----
Looking at tests in blackbox/test_diff.py I see something strange.
At first declared
then declared 3 another classes (1 without new tests and 2 with new
tests), and each next class use TestDiff as ancestor.
All this classes use method make_example_branch to setup at the start of
But really strange thing here that only one class need to subclass
TestDiff -- it's the test TestCheckoutDiff -- because only this class
don't provide new test methods but instead change functionality of
helper methods like make_example_branch and others.
2 other classes (TestDiffLabels, TestExternalDiff) subclass this class
only for using unmodified make_example_branch method.
I think it's wrong, because 2 latter classes reinvoke base tests from
TestDiff. So this is only waste the time of selftest. And if any test in
TestDiff will fails it also fails in this classes as well, provide only
I think we need create one base class (e.g. TestDiffBase) with helper
method (make_example_branch) and subclass all other classes correctly:
What you think?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
More information about the bazaar