def test_remove_files(self): tmpfile = tempfile.NamedTemporaryFile(suffix=".unittest", delete=False) libvirt_setup.remove_files("/tmp/tmp*.unittest") self.assertFalse(os.access("/tmp/{0}".format(tmpfile.name), os.X_OK))