コード例 #1
0
ファイル: task.py プロジェクト: starcraftman/pakit
 def run(self):
     """
     Execute a set of operations to perform the Task.
     """
     write_config(self.filename)
     print('Wrote default config to', self.filename)
コード例 #2
0
ファイル: test_shell.py プロジェクト: kostyll/pakit
 def test_write_config_dir(self):
     os.mkdir(self.conf_file)
     with pytest.raises(PakitError):
         write_config(self.conf_file)
コード例 #3
0
ファイル: test_shell.py プロジェクト: kostyll/pakit
 def test_write_config_perms(self):
     with pytest.raises(PakitError):
         write_config("/ttt.yml")
コード例 #4
0
ファイル: test_shell.py プロジェクト: kostyll/pakit
 def test_write_config(self):
     assert not os.path.exists(self.conf_file)
     write_config(self.conf_file)
     assert os.path.exists(self.conf_file)