示例#1
0
 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
 def test_write_config_dir(self):
     os.mkdir(self.conf_file)
     with pytest.raises(PakitError):
         write_config(self.conf_file)
示例#3
0
 def test_write_config_perms(self):
     with pytest.raises(PakitError):
         write_config("/ttt.yml")
示例#4
0
 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)