コード例 #1
0
ファイル: test_fs.py プロジェクト: ThePenguin1140/jabbapylib
 def test_get_oct_mode(self):
     assert fs.remove_file_silently(cfg.TMP_FILE)
     #
     assert fs.touch(cfg.TMP_FILE, mode=0755)
     assert fs.get_oct_mode(cfg.TMP_FILE) == '0755'
     #
     assert fs.remove_file_silently(cfg.TMP_FILE)
コード例 #2
0
ファイル: test_fs.py プロジェクト: the7day/jabbapylib
 def test_get_oct_mode(self):
     assert fs.remove_file_silently(cfg.TMP_FILE)
     #
     assert fs.touch(cfg.TMP_FILE, mode=0755)
     assert fs.get_oct_mode(cfg.TMP_FILE) == '0755'
     #
     assert fs.remove_file_silently(cfg.TMP_FILE)
コード例 #3
0
ファイル: test_fs.py プロジェクト: ThePenguin1140/jabbapylib
 def test_set_mode_to(self):
     assert fs.remove_file_silently(cfg.TMP_FILE)
     #
     assert fs.touch(cfg.TMP_FILE, mode=0600)
     assert fs.get_oct_mode(cfg.TMP_FILE) == '0600'
     assert fs.set_mode_to(cfg.TMP_FILE, 0755)
     assert fs.set_mode_to(cfg.TMP_FILE, 0700)
     #
     assert fs.remove_file_silently(cfg.TMP_FILE)
コード例 #4
0
ファイル: test_fs.py プロジェクト: the7day/jabbapylib
 def test_set_mode_to(self):
     assert fs.remove_file_silently(cfg.TMP_FILE)
     #
     assert fs.touch(cfg.TMP_FILE, mode=0600)
     assert fs.get_oct_mode(cfg.TMP_FILE) == '0600'
     assert fs.set_mode_to(cfg.TMP_FILE, 0755)
     assert fs.set_mode_to(cfg.TMP_FILE, 0700)
     #
     assert fs.remove_file_silently(cfg.TMP_FILE)
コード例 #5
0
ファイル: test_fs.py プロジェクト: ThePenguin1140/jabbapylib
 def test_touch(self):
     assert fs.remove_file_silently(cfg.TMP_FILE)
     #
     assert fs.touch(cfg.TMP_FILE)
     assert os.path.exists(cfg.TMP_FILE)
     #
     assert fs.remove_file_silently(cfg.TMP_FILE)
     assert fs.touch(cfg.TMP_FILE, mode=0644)
     assert fs.get_oct_mode(cfg.TMP_FILE) == '0644'
     #
     assert fs.remove_file_silently(cfg.TMP_FILE)
コード例 #6
0
ファイル: test_fs.py プロジェクト: the7day/jabbapylib
 def test_touch(self):
     assert fs.remove_file_silently(cfg.TMP_FILE)
     #
     assert fs.touch(cfg.TMP_FILE)
     assert os.path.exists(cfg.TMP_FILE)
     #
     assert fs.remove_file_silently(cfg.TMP_FILE)
     assert fs.touch(cfg.TMP_FILE, mode=0644)
     assert fs.get_oct_mode(cfg.TMP_FILE) == '0644'
     #
     assert fs.remove_file_silently(cfg.TMP_FILE)
コード例 #7
0
ファイル: test_image.py プロジェクト: jeffreywinn/jabbapylib
def test_exists_1():
    assert fs.remove_file_silently(img.get_local_path())
    assert img.exists() is False
コード例 #8
0
ファイル: test_fs.py プロジェクト: ThePenguin1140/jabbapylib
 def test_remove_file_silently(self):
     fname = '/stupid_directory_name/doesnt_exist.txt'
     assert fs.remove_file_silently(fname)
     assert fs.touch(cfg.TMP_FILE)
     assert os.path.exists(cfg.TMP_FILE)
     assert fs.remove_file_silently(cfg.TMP_FILE)
コード例 #9
0
ファイル: test_image.py プロジェクト: the7day/jabbapylib
def test_exists_1():
    assert fs.remove_file_silently(img.get_local_path())
    assert img.exists() is False
コード例 #10
0
ファイル: test_fs.py プロジェクト: the7day/jabbapylib
 def test_remove_file_silently(self):
     fname = '/stupid_directory_name/doesnt_exist.txt'
     assert fs.remove_file_silently(fname)
     assert fs.touch(cfg.TMP_FILE)
     assert os.path.exists(cfg.TMP_FILE)
     assert fs.remove_file_silently(cfg.TMP_FILE)