Supressing ResourceWarnings for unclosed files in the test suite. Revert me when fixed

This commit is contained in:
wiredfool 2013-05-23 10:44:09 -07:00
parent 2322619372
commit ab0fe89131

View File

@ -3,6 +3,15 @@ from __future__ import print_function
# require that deprecation warnings are triggered
import warnings
warnings.simplefilter('default')
# temporarily turn off resource warnings that warn about unclosed
# files in the test scripts.
try:
warnings.filterwarnings("ignore", category=ResourceWarning)
except NameError:
# we expect a NameError on py2.x, since it doesn't have ResourceWarnings.
pass
import sys
py3 = (sys.version_info >= (3,0))