def test_filelock_passes(tmpdir):
 package_name = 'conda_file1'
 tmpfile = join(tmpdir.strpath, package_name)
 with FileLock(tmpfile) as lock:
  path = basename(lock.lock_file_path)
  assert (tmpdir.join(path).exists() and tmpdir.join(path).isfile())
 assert (not tmpdir.join(path).exists())

def test_filelock_passes ( tmpdir ) : package_name = 'conda_file1' tmpfile = join ( tmpdir . strpath , package_name ) with FileLock ( tmpfile ) as lock : path = basename ( lock . lock_file_path ) assert ( tmpdir . join ( path ) . exists ( ) and tmpdir . join ( path ) . isfile ( ) ) assert ( not tmpdir . join ( path ) . exists ( ) )
normal test on file lock .