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
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"
def test___str__(self): df = DF.Dockerfile(self.specs) assert str(df) == df.cmd
def test___repr__(self): DF.Dockerfile(self.specs)