def test_parse_invalid_assign_in_trailing_comment(self): with self.assertRaises(ConfVarsSyntaxError) as cm:
self.loads("a#=comment\n")
self.assertTrue(
re.match("Expecting key=value format \\(.*, line 1\\)", str(cm.exception))
)
def test_parse_invalid_assignment(self): with self.assertRaises(ConfVarsSyntaxError) as cm:
self.loads("a#comment\n")
self.assertTrue(
re.match("Expecting key=value format \\(.*, line 1\\)", str(cm.exception))
)
def test_parse_invalid_value(self): with self.assertRaises(ConfVarsSyntaxError) as cm:
self.loads("#comment\na='er\n")
self.assertTrue(
re.match( "Unterminated quoted string \\(.*, line 2\\)",
str(cm.exception),
)
) with self.assertRaises(ConfVarsSyntaxError) as cm:
self.loads("a= er\n")
self.assertTrue(
re.match( "Expecting no spaces between '=' and 'er' \\(.*, line 1\\)",
str(cm.exception),
)
)
def test_parse_invalid_char(self): with self.assertRaises(ConfVarsSyntaxError) as cm:
self.loads("a=$\n")
self.assertTrue(
re.match( "Unquoted, non-escaped special character '\\$' \\(.*, line 1\\)",
str(cm.exception),
)
)
def test_parse_invalid_key(self): with self.assertRaises(ConfVarsSyntaxError) as cm:
self.loads(" a=1\n")
self.assertTrue(
re.match( "Expecting no spaces around 'a' \\(.*, line 1\\)",
str(cm.exception),
)
) with self.assertRaises(ConfVarsSyntaxError) as cm:
self.loads("a =1\n")
self.assertTrue(
re.match( "Expecting no spaces around 'a' \\(.*, line 1\\)",
str(cm.exception),
)
)
def test_parse_redundant_key(self): with self.assertRaises(ConfVarsSyntaxError) as cm:
self.loads("a=1\na=2\n")
self.assertTrue(
re.match( "Invalid redefinition for 'a' \\(.*, line 2\\)",
str(cm.exception),
)
)
if __name__ == "__main__":
mozunit.main()
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.10 Sekunden
(vorverarbeitet am 2026-08-25)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.