setup_package and teardown_package get called twice when running functional tests using nose. With in-process mode the first call to teardown_package clears global config which causes the test swiftclient to raise a SkipTest error during the second call to teardown_package. To reproduce: SWIFT_TEST_IN_PROCESS=1 nosetests ./test/functional/test_account.py This patch simply tests for config existence before attempting to create a test swiftclient in the teardown_package function. Also fix a related issue whereby in_process flag would be reset to False during second call to setup_package, thus causing some of the in process cleanup in teardown_package to never be executed. Change-Id: I074dcd3d39aa46b262632024b047556ca471e8b8
40 KiB
40 KiB