コード例 #1
0
 def test__create_cmd(self):
     cmd = DF.Dockerfile(self.specs).cmd
     assert self.base in cmd
     assert self.noninteractive in cmd
     assert self.miniconda in cmd
     assert self.ants in cmd
     assert self.fsl in cmd
     assert self.spm in cmd
     assert _get_val_in_list_of_tuple(self.specs['instructions'], 'instruction') in cmd
コード例 #2
0
 def test_save(self):
     filepath = self.tmpdir.join('Dockerfile')
     df = DF.Dockerfile(self.specs)
     df.save(filepath.strpath)
     assert len(self.tmpdir.listdir()) == 1, "file not saved"
     assert df.cmd in filepath.read(), "file content not correct"
コード例 #3
0
 def test___str__(self):
     df = DF.Dockerfile(self.specs)
     assert str(df) == df.cmd
コード例 #4
0
 def test___repr__(self):
     DF.Dockerfile(self.specs)