def test_check_fp_grp(): assert FileOps.check_fp("LICENSE", FP.R_GRP) if sys.platform == "darwin": assert not FileOps.check_fp("LICENSE", FP.W_GRP) else: assert FileOps.check_fp("LICENSE", FP.W_GRP) assert not FileOps.check_fp("LICENSE", FP.X_GRP)
def test_check_fp_oth(): assert FileOps.check_fp("LICENSE", FP.R_OTH) assert not FileOps.check_fp("LICENSE", FP.W_OTH) assert not FileOps.check_fp("LICENSE", FP.X_OTH)
def test_check_fp_usr(): assert FileOps.check_fp("LICENSE", FP.R_USR | FP.W_USR) assert not FileOps.check_fp("LICENSE", FP.X_USR)
def test_is_root_negative(): assert not FileOps.is_roots("LICENSE")
def test_is_root_positive(): assert FileOps.is_roots("/etc")
def test_is_mine_negative(): assert not FileOps.is_mine("/etc")
def test_is_mine_positive(): assert FileOps.is_mine("LICENSE")