[FIX] Recover global state after test_util.py (#5824)
authormbaret <55580676+mbaret@users.noreply.github.com>
Fri, 19 Jun 2020 14:35:05 +0000 (15:35 +0100)
committerGitHub <noreply@github.com>
Fri, 19 Jun 2020 14:35:05 +0000 (07:35 -0700)
commitc890573ac4cd8cdfd28a6477d92117b95bc67aed
treea15dd7e9a4f5b26d9585f38ef40fca5ccd09b0d1
parent64766c2cb1cd3ce41ee91a54909882036fffd412
[FIX] Recover global state after test_util.py (#5824)

In test_util.py, a program exit is simulated to test
that the error throwing behaviour is accurate.
Unforunately, this also deletes necessary global state
and so all subsequent tests that run and use tempdir
throw the same error.

This patch is a simple fix to restore the global state
at the end of the test.

Change-Id: I62fef46167e47f6af43271e2ce1db30f54857647
tests/python/contrib/test_util.py