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

        fs = internal_yaml._expand_filesets_for('stage', self.properties)
        self.assertEqual(fs, ['1'])
Example #5
0
    def test_expand_var(self):
        self.properties['stage'] = ['$1']

        fs = internal_yaml._expand_filesets_for('stage', self.properties)
        self.assertEqual(fs, ['1', '2', '3'])
Example #6
0
    def test_no_expansion(self):
        self.properties['stage'] = ['1']

        fs = internal_yaml._expand_filesets_for('stage', self.properties)
        self.assertEqual(fs, ['1'])
Example #7
0
    def test_expand_var(self):
        self.properties['stage'] = ['$1']

        fs = internal_yaml._expand_filesets_for('stage', self.properties)
        self.assertEqual(fs, ['1', '2', '3'])
Example #8
0
    def test_no_expansion(self):
        self.properties["stage"] = ["1"]

        fs = internal_yaml._expand_filesets_for("stage", self.properties)
        self.assertEqual(fs, ["1"])
Example #9
0
    def test_expand_var(self):
        self.properties["stage"] = ["$1"]

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