Beispiel #1
0
    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')
Beispiel #2
0
    def test_no_expansion(self):
        self.properties['stage'] = ['1']

        fs = parts._expand_filesets_for('stage', self.properties)
        self.assertEqual(fs, ['1'])
Beispiel #3
0
    def test_expand_var(self):
        self.properties['stage'] = ['$1']

        fs = parts._expand_filesets_for('stage', self.properties)
        self.assertEqual(fs, ['1', '2', '3'])