def test_cleanTemp(self): # a write temp and clean temp should not affect original file source_file = os.path.join(TEST_DATA_DIR, 'test_file.dat') ntools.assert_true(os.path.isfile(source_file)) d = DataFileElement(source_file) d.write_temp() ntools.assert_equal(len(d._temp_filepath_stack), 0) d.clean_temp() ntools.assert_true(os.path.isfile(source_file))