コード例 #1
0
ファイル: test_parsers.py プロジェクト: phrrngtn/pydap
 def test_peek_missing(self):
     """Test the peek method when the token does not exist."""
     parser = SimpleParser("Hello, World!")
     self.assertEqual(parser.peek("\d+"), "")
コード例 #2
0
ファイル: test_parsers.py プロジェクト: pydap/pydap
 def test_peek_missing(self):
     """Test the peek method when the token does not exist."""
     parser = SimpleParser("Hello, World!")
     self.assertEqual(parser.peek("\d+"), "")
コード例 #3
0
ファイル: test_parsers.py プロジェクト: phrrngtn/pydap
 def test_peek_existing(self):
     """Test the peek method when the token exists."""
     parser = SimpleParser("Hello, World!")
     self.assertEqual(parser.peek("\w+"), "Hello")
コード例 #4
0
ファイル: test_parsers.py プロジェクト: pydap/pydap
 def test_peek_existing(self):
     """Test the peek method when the token exists."""
     parser = SimpleParser("Hello, World!")
     self.assertEqual(parser.peek("\w+"), "Hello")