Пример #1
0
 def test_empty_string(self):
     self.assertEqual(
         next(visp.lex('""')).type,
         'string')
     self.assertEqual(
         next(visp.lex('""')).string,
         '')
Пример #2
0
 def test_lparen(self):
     self.assertEqual(
         next(visp.lex('(')).type,
         'lparen')
Пример #3
0
 def test_quote(self):
     self.assertEqual(
         next(visp.lex('\'')).type,
         'quote')
Пример #4
0
 def test_hashsym3(self):
     self.assertEqual(
         next(visp.lex('#hello')).type,
         'hashsym')
Пример #5
0
 def test_hashsym1(self):
     self.assertEqual(
         next(visp.lex('#e')).type,
         'hashsym')
Пример #6
0
 def test_symbol(self):
     self.assertEqual(
         next(visp.lex('foo%$!')).type,
         'symbol')
Пример #7
0
 def test_number(self):
     self.assertEqual(
         next(visp.lex('12345')).type,
         'number')
Пример #8
0
 def test_number(self):
     self.assertEqual(next(visp.lex('12345')).type, 'number')
Пример #9
0
 def test_wspace(self):
     self.assertEqual(len(list(visp.lex('     '))), 0)
Пример #10
0
 def test_lparen(self):
     self.assertEqual(next(visp.lex('(')).type, 'lparen')
Пример #11
0
 def test_empty_string(self):
     self.assertEqual(next(visp.lex('""')).type, 'string')
     self.assertEqual(next(visp.lex('""')).string, '')
Пример #12
0
 def test_quote(self):
     self.assertEqual(next(visp.lex('\'')).type, 'quote')
Пример #13
0
 def test_hashsym3(self):
     self.assertEqual(next(visp.lex('#hello')).type, 'hashsym')
Пример #14
0
 def test_hashsym1(self):
     self.assertEqual(next(visp.lex('#e')).type, 'hashsym')
Пример #15
0
 def test_symbol(self):
     self.assertEqual(next(visp.lex('foo%$!')).type, 'symbol')
Пример #16
0
 def test_dot(self):
     self.assertEqual(
         next(visp.lex('.')).type,
         'dot')
Пример #17
0
 def test_wspace(self):
     self.assertEqual(
         len(list(visp.lex('     '))),
         0)
Пример #18
0
 def test_dot(self):
     self.assertEqual(next(visp.lex('.')).type, 'dot')