comparison tests/test_helpers.py @ 1488:8d8fc10d0d0a stable

test_helpers: avoid leaking a temporary directory
author Augie Fackler <raf@durin42.com>
date Sun, 26 Jun 2016 21:07:04 -0400
parents d741f536f23a
children
comparison
equal deleted inserted replaced
1487:b9530c171050 1488:8d8fc10d0d0a
28 fs.setfile('bb', 'bb') 28 fs.setfile('bb', 'bb')
29 self.assertEqual(1, len(os.listdir(fs._tempdir))) 29 self.assertEqual(1, len(os.listdir(fs._tempdir)))
30 fs.popfile('bb') 30 fs.popfile('bb')
31 self.assertEqual([], os.listdir(fs._tempdir)) 31 self.assertEqual([], os.listdir(fs._tempdir))
32 self.assertRaises(editor.EditingError, lambda: fs.getfile('bb')) 32 self.assertRaises(editor.EditingError, lambda: fs.getfile('bb'))
33 fs.close()