Esempio n. 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)
Esempio n. 2
0
 def test_write_config_dir(self):
     os.mkdir(self.conf_file)
     with pytest.raises(PakitError):
         write_config(self.conf_file)
Esempio n. 3
0
 def test_write_config_perms(self):
     with pytest.raises(PakitError):
         write_config("/ttt.yml")
Esempio n. 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)