def test_invalid_expansion(self): self.properties['stage'] = ['$3'] with self.assertRaises(parts.SnapcraftLogicError) as raised: parts._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 = parts._expand_filesets_for('stage', self.properties) self.assertEqual(fs, ['1'])
def test_expand_var(self): self.properties['stage'] = ['$1'] fs = parts._expand_filesets_for('stage', self.properties) self.assertEqual(fs, ['1', '2', '3'])