Fix unit tests to not pollute the test directories of other tests.

Review Request #9654 — Created Feb. 16, 2018 and discarded — Latest diff uploaded

Information

RBTools
master

Reviewers

Fix test pollution and unit tests.

What was happening was that a single test failure would cause all following tests to fail with directory not found when trying to modify the home directory.
This also uncovered an issue with test_diff_exclude_in_subdir and test_diff_exclude_root_pattern_in_subdir

Also I'm removing the mktemp since it is deprecated and the class already provides that functionality.

time ./tests/runtests.py

/Volumes/Augie/solarmist/rbtools/lib/python2.7/site-packages/nose/pyversion.py:36: DeprecationWarning: The 'new' module has been removed in Python 3.0; use the 'types' module instead.
import new
/Volumes/Augie/solarmist/rbtools/lib/python2.7/site-packages/nose/plugins/prof.py:14: DeprecationWarning: The 'hotshot' module is not supported in 3.x, use the 'profile' module instead.
import hotshot
/Volumes/Augie/solarmist/rbtools/lib/python2.7/site-packages/nose/pyversion.py:49: DeprecationWarning: Overriding __eq__ blocks inheritance of __hash__ in 3.x
class Key(object):
#1 Testing the cache with a high max-age value ... /Volumes/Augie/solarmist/rbtools/rbtools/api/cache.py:479: DeprecationWarning: buffer() not supported in 3.x
sqlite3.Binary(entry.response_body)))
ok
#2 Testing the cache with a zero max-age value ... /Volumes/Augie/solarmist/rbtools/rbtools/api/cache.py:493: DeprecationWarning: buffer() not supported in 3.x
sqlite3.Binary(entry.response_body), entry.url,
ok
...
Ran 210 tests in 204.074s

OK
./tests/runtests.py 85.38s user 56.70s system 69% cpu 3:24.53 total

    Loading...