def test_parse__name_value_with_quoted_value(self): texts = [ 'person="Alice and Bob"', "person='Alice and Bob'", ] for text in texts: parts = parse_user_define(text) self.assertEqual(parts, ("person", "Alice and Bob"))
def test_parse__name_value_with_padded_whitespace(self): texts = [ " person=Alice", "person=Alice ", "person = Alice", ] for text in texts: parts = parse_user_define(text) self.assertEqual(parts, ("person", "Alice"))
def test_parse__name_only_for_boolean_flag(self): parts = parse_user_define("boolean_flag") self.assertEqual(parts, ("boolean_flag", "true"))
def test_parse__name_value(self): parts = parse_user_define("person=Alice") self.assertEqual(parts, ("person", "Alice"))
def test_parse__name_value_with_quoted_value(self, text): parts = parse_user_define(text) assert parts == ("person", "Alice and Bob")
def test_parse__name_only_for_boolean_flag(self): parts = parse_user_define("boolean_flag") assert parts == ("boolean_flag", "true")
def test_parse__name_value_with_padded_whitespace(self, text): parts = parse_user_define(text) assert parts == ("person", "Alice")
def test_parse__name_value(self): parts = parse_user_define("person=Alice") assert parts == ("person", "Alice")