• 
      

    Fix unit tests for SVN 1.6 and Python 2.6

    Review Request #7503 — Created July 8, 2015 and submitted — Latest diff uploaded

    Information

    RBTools
    release-0.7.x
    2fb7e92...

    Reviewers

    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 use TestCase.assertTrue(element in Container). All tests
    using TestCase.assertRaises as a context manager have been rewritten
    to not use a context manager.

    The tests that operate on the output of svn diff have 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 in shlex.split for 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