コード例 #1
0
ファイル: test_filesystem.py プロジェクト: aryoxp/trash-cli
 def test_has_sticky_bit_returns_false(self):
     Path("sandbox").mkdirs()
     non_sticky=Path("sandbox").join("non-sticky")
     non_sticky.touch()
     assert subprocess.call(["chmod", "-t", "sandbox/non-sticky"]) == 0
     assert not non_sticky.has_sticky_bit()
コード例 #2
0
ファイル: test_filesystem.py プロジェクト: aryoxp/trash-cli
 def test_has_sticky_bit_returns_true(self):
     Path("sandbox").mkdirs()
     sticky=Path("sandbox").join("sticky")
     sticky.touch()
     assert subprocess.call(["chmod", "+t", "sandbox/sticky"]) == 0
     assert sticky.has_sticky_bit()