def test_invalid_expansion(self): self.properties["stage"] = ["$3"] with self.assertRaises(internal_yaml.SnapcraftLogicError) as raised: internal_yaml._expand_filesets_for("stage", self.properties) self.assertEqual( raised.exception.message, "'$3' referred to in the 'stage' fileset but it is not " "in filesets" )
def test_invalid_expansion(self): self.properties['stage'] = ['$3'] with self.assertRaises(internal_yaml.SnapcraftLogicError) as raised: internal_yaml._expand_filesets_for('stage', self.properties) self.assertEqual( raised.exception.message, '\'$3\' referred to in the \'stage\' fileset but it is not ' 'in filesets')
def test_no_expansion(self): self.properties['stage'] = ['1'] fs = internal_yaml._expand_filesets_for('stage', self.properties) self.assertEqual(fs, ['1'])
def test_expand_var(self): self.properties['stage'] = ['$1'] fs = internal_yaml._expand_filesets_for('stage', self.properties) self.assertEqual(fs, ['1', '2', '3'])
def test_no_expansion(self): self.properties["stage"] = ["1"] fs = internal_yaml._expand_filesets_for("stage", self.properties) self.assertEqual(fs, ["1"])
def test_expand_var(self): self.properties["stage"] = ["$1"] fs = internal_yaml._expand_filesets_for("stage", self.properties) self.assertEqual(fs, ["1", "2", "3"])