def test_remove_ok(self): """Test that the file can be removed without error""" with refpkg_align._temp_file() as tf: tf.close() os.unlink(tf.name)
def test_close(self): with refpkg_align._temp_file() as tf: self.assertFalse(tf.closed) tf.close() self.assertTrue(os.path.isfile(tf.name)) self.assertFalse(os.path.exists(tf.name))