def test_should_infer_multiple_options(self): self.assertEqual( {'test': True, 'p': 151, 'a_cool_option': 'abc', 'foobar_arg': 'baz'}, infer_options_from_arguments({'--foobar-arg': 'baz', '--test': True, 'status': False, '--a-cool-option': 'abc', 'sOmEaRgUm3nT': 42, '-p': 151}))
def test_should_strip_dashdash_from_options_when_they_start_with_dash(self): self.assertEqual( {'foobar': 'baz'}, infer_options_from_arguments({'--foobar': 'baz'}))
def test_should_replace_dashes_when_there_are_underscores_in_options(self): self.assertEqual( {'foobar_arg': 'baz'}, infer_options_from_arguments({'--foobar-arg': 'baz'}))
def test_should_not_include_arguments_when_they_do_not_start_with_dash(self): self.assertEqual( {}, infer_options_from_arguments({'foobar-arg': 'baz'}))