On 1.6.2016 09:16, Vratislav Podzimek wrote:
On Wed, 2016-06-01 at 08:51 +0200, Jiří Konečný wrote:
> On Tue, 2016-05-31 at 14:35 +0200, Radek Vykydal wrote:
>> + network_data = self.assert_parse("network --device eth0 --
>> activate --no-activate")
>> + self.assertEquals(network_data.activate, False)
>> + network_data = self.assert_parse("network --device eth0 --
>> no-activate --activate")
>> + self.assertEquals(network_data.activate, True)
> Shouldn't this two tests give us an error/exception instead?
> I see this as a big place to generate errors from missing one of these
> parameters in a command.
>
> I think good behavior here should be to let user know that these
> commands can't be used together.
AFAICT, it's basically impossible to check for this now with both options using
the 'activate' attribute. And the policy is that the last one wins which should
be okay and many command line tools work the same way with such options.
This is exactly my opinion.