Ejemplo n.º 1
0
    def test_expand_repeatable_option(self):
        option, values = 'keyspace', {}
        result = expand_repeatable_option(option, values)
        assert result == ''

        option, values = 'keyspace', {'k1'}
        result = expand_repeatable_option(option, values)
        assert result == '--keyspace k1'

        option, values = 'keyspace', {'k1', 'k2'}
        result = expand_repeatable_option(option, sorted(list(values)))
        assert result == '--keyspace k1 --keyspace k2'
Ejemplo n.º 2
0
    def test_expand_repeatable_option(self):

        option, values = 'keyspace', {}
        result = expand_repeatable_option(option, values)
        self.assertEqual('', result)

        option, values = 'keyspace', {'k1'}
        result = expand_repeatable_option(option, values)
        self.assertEqual('--keyspace k1', result)

        option, values = 'keyspace', {'k1', 'k2'}
        result = expand_repeatable_option(option, sorted(list(values)))
        self.assertEqual('--keyspace k1 --keyspace k2', result)