Fix unit tests for SVN 1.6 and Python 2.6
Review Request #7503 — Created July 8, 2015 and submitted
This patch fixes some issues with Python 2.6 compatability and using
SVN 1.6.All tests using
TestCase.assertIn(element, container)have been
rewritten to useTestCase.assertTrue(element in Container). All tests
usingTestCase.assertRaisesas a context manager have been rewritten
to not use a context manager.The tests that operate on the output of
svn diffhave been modified
to have a decorator applied to them that will supply the correct hash
depending on the current version of SVN. This is required because SVN
prior to 1.7 will generate a different diff.The aliases module has been updated to ensure that on pre Python 2.7.3
that the command is passed as a binary string and not a unicode string.
Support inshlex.splitfor unicode strings was added in Python
2.7.3.
Unit tests passed using all the following combinations:
- Python 2.6, SVN 1.6
- Python 2.6, SVN 1.8
- Python 2.6, SVN 1.6
- Python 2.6, SVN 1.8
| Description | From | Last Updated |
|---|---|---|
|
translated is kind of a generic name. Maybe convert_shlex_text_type? You could also assign this variable first and then use that … |
|
Tool: Pyflakes Processed Files: rbtools/api/tests.py rbtools/utils/aliases.py rbtools/clients/tests.py Tool: PEP8 Style Checker Processed Files: rbtools/api/tests.py rbtools/utils/aliases.py rbtools/clients/tests.py