[patch] Small refactoring in test suite.

Aaron Bentley aaron.bentley at utoronto.ca
Sun Feb 5 22:03:11 GMT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

+1.  I don't know why I capitalized it in the first place.  I don't have
and integration branch, though.

Aaron

Jan Hudec wrote:
| 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):
|
|

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFD5nYe0F+nu1YWqI0RArAXAJ0VJZ9o2sv72XYTCQYxi+xXSnOvGACfZDkJ
qBKaJPMpTqrb8QAE4A0BaC0=
=QLPS
-----END PGP SIGNATURE-----




More information about the bazaar mailing list