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"))
示例#2
0
 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"))
示例#4
0
 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"))
示例#7
0
 def test_parse__name_only_for_boolean_flag(self):
     parts = parse_user_define("boolean_flag")
     self.assertEqual(parts, ("boolean_flag", "true"))
示例#8
0
 def test_parse__name_value_with_quoted_value(self, text):
     parts = parse_user_define(text)
     assert parts == ("person", "Alice and Bob")
示例#9
0
 def test_parse__name_value(self):
     parts = parse_user_define("person=Alice")
     self.assertEqual(parts, ("person", "Alice"))
示例#10
0
 def test_parse__name_only_for_boolean_flag(self):
     parts = parse_user_define("boolean_flag")
     assert parts == ("boolean_flag", "true")
示例#11
0
 def test_parse__name_value_with_padded_whitespace(self, text):
     parts = parse_user_define(text)
     assert parts == ("person", "Alice")
示例#12
0
 def test_parse__name_value(self):
     parts = parse_user_define("person=Alice")
     assert parts == ("person", "Alice")
示例#13
0
 def test_parse__name_value_with_quoted_value(self, text):
     parts = parse_user_define(text)
     assert parts == ("person", "Alice and Bob")
示例#14
0
 def test_parse__name_value_with_padded_whitespace(self, text):
     parts = parse_user_define(text)
     assert parts == ("person", "Alice")
示例#15
0
 def test_parse__name_only_for_boolean_flag(self):
     parts = parse_user_define("boolean_flag")
     assert parts == ("boolean_flag", "true")
示例#16
0
 def test_parse__name_value(self):
     parts = parse_user_define("person=Alice")
     assert parts == ("person", "Alice")