Пример #1
0
    def test_ident(self):
        self.assertTrue(IDENT.load("algo").value == "algo")
        self.assertTrue(IDENT.load("Algo").value == "Algo")
        self.assertTrue(IDENT.load("_algo").value == "_algo")
        self.assertTrue(IDENT.load("  _algo  ").value == "_algo")
        self.assertTrue(IDENT.load("  'algo'  ").value == QIDENT("algo"))

        self.assertRaises(ParseError, lambda: IDENT.load("1algo"))
Пример #2
0
    def test_ident(self):
        self.assertTrue(IDENT.load("algo").value == "algo")
        self.assertTrue(IDENT.load("Algo").value == "Algo")
        self.assertTrue(IDENT.load("_algo").value == "_algo")
        self.assertTrue(IDENT.load("  _algo  ").value == "_algo")
        self.assertTrue(IDENT.load("  'algo'  ").value == QIDENT("algo"))

        self.assertRaises(ParseError, lambda: IDENT.load("1algo"))
Пример #3
0
 def test_qident(self):
     self.assertTrue(IDENT.load("'algoas'").value == QIDENT("algoas"))
Пример #4
0
 def test_qident(self):
     self.assertTrue(IDENT.load("'algoas'").value == QIDENT("algoas"))