[patch] Small refactoring in test suite.
Jan Hudec
bulb at ucw.cz
Sun Feb 5 17:29:20 GMT 2006
Hello folks,
Would someone be willing to integrate following trivial fix to make things
more pretty?
(note: I'll probably include it in the glob branch if neither accepted nor
vetoed)
Thanks,
Jan
=== modified file 'bzrlib/tests/__init__.py'
--- bzrlib/tests/__init__.py
+++ bzrlib/tests/__init__.py
@@ -285,7 +285,7 @@
raise AssertionError('pattern "%s" not found in "%s"'
% (needle_re, haystack))
- def AssertSubset(self, sublist, superlist):
+ def assertSubset(self, sublist, superlist):
"""Assert that every entry in sublist is present in superlist."""
missing = []
for entry in sublist:
=== modified file 'bzrlib/tests/test_smart_add.py'
--- bzrlib/tests/test_smart_add.py
+++ bzrlib/tests/test_smart_add.py
@@ -106,10 +106,10 @@
self.build_tree(['inertiatic/', 'inertiatic/esp', 'inertiatic/CVS',
'inertiatic/foo.pyc'])
added, ignored = smart_add_tree(wt, u'.')
- self.AssertSubset(('inertiatic', 'inertiatic/esp'), added)
- self.AssertSubset(('CVS', '*.py[oc]'), ignored)
- self.AssertSubset(('inertiatic/CVS',), ignored['CVS'])
- self.AssertSubset(('inertiatic/foo.pyc',), ignored['*.py[oc]'])
+ self.assertSubset(('inertiatic', 'inertiatic/esp'), added)
+ self.assertSubset(('CVS', '*.py[oc]'), ignored)
+ self.assertSubset(('inertiatic/CVS',), ignored['CVS'])
+ self.assertSubset(('inertiatic/foo.pyc',), ignored['*.py[oc]'])
class TestSmartAddBranch(TestCaseWithTransport):
--
Jan 'Bulb' Hudec <bulb at ucw.cz>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060205/c895251f/attachment.pgp
More information about the bazaar
mailing list