Fix ResourceWarning in test_unittest when interrupted
1 file changed