def _test_single(self, filename):
    remove_if_exists(filename)
    create_empty_file(filename)
    try:
        self._do_single(filename)
    finally:
        os.unlink(filename)
    self.assertTrue((not os.path.exists(filename)))
    f = os.open(filename, os.O_CREAT)
    os.close(f)
    try:
        self._do_single(filename)
    finally:
        os.unlink(filename)
def _test_single(self, filename):
    remove_if_exists(filename)
    create_empty_file(filename)
    try:
        self._do_single(filename)
    finally:
        os.unlink(filename)
    self.assertTrue((not os.path.exists(filename)))
    f = os.open(filename, os.O_CREAT)
    os.close(f)
    try:
        self._do_single(filename)
    finally:
        os.unlink(filename)