Commit 199567c5 authored by André Anjos's avatar André Anjos 💬
Browse files

Clean-up before all tests

parent a598375e
Pipeline #3975 passed with stages
in 6 minutes and 39 seconds
......@@ -12,6 +12,15 @@ import platform
from .envwrapper import EnvironmentWrapper
def cleanup():
'''Removes weird variables from the user environment just for the tests'''
remove = ['CFLAGS', 'CXXFLAGS', 'LDFLAGS', 'BOB_PREFIX_PATH',
'PKG_CONFIG_PATH', 'CMAKE_PREFIX_PATH', 'MACOSX_DEPLOYMENT_TARGET']
for key in remove:
if key in os.environ: del os.environ[key]
@nose.with_setup(cleanup)
def test_default():
e = EnvironmentWrapper(logging.getLogger())
......@@ -32,14 +41,6 @@ def test_default():
assert key in before, "key `%s' was not on os.environ before" % (key,)
nose.tools.eq_(before, os.environ)
def cleanup():
'''Removes weird variables from the user environment just for the tests'''
remove = ['CFLAGS', 'CXXFLAGS', 'LDFLAGS', 'BOB_PREFIX_PATH',
'PKG_CONFIG_PATH', 'CMAKE_PREFIX_PATH', 'MACOSX_DEPLOYMENT_TARGET']
for key in remove:
if key in os.environ: del os.environ[key]
@nose.with_setup(cleanup)
def test_set_debug_true():
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment