Пример #1
0
 def test_no_match(self):
     """Test REGEX_DISTANT_SEMICOLIN with no spaces"""
     s = "CREATE DATABSE foobar;"
     matches = REGEX_DISTANT_SEMICOLIN.search(s)
     self.assertFalse(matches)
Пример #2
0
 def test_tabs(self):
     """Test REGEX_DISTANT_SEMICOLIN with tabs"""
     s = "CREATE DATABSE foobar      ;"
     matches = REGEX_DISTANT_SEMICOLIN.search(s)
     self.assertTrue(matches)
Пример #3
0
 def test_newline(self):
     """Test REGEX_DISTANT_SEMICOLIN with newline"""
     s = """CREATE DATABSE foobar
     ;"""
     matches = REGEX_DISTANT_SEMICOLIN.search(s)
     self.assertTrue(matches)
Пример #4
0
 def test_multiple_spaces(self):
     """Test REGEX_DISTANT_SEMICOLIN with multiple spaces"""
     s = "CREATE DATABSE foobar    ;"
     matches = REGEX_DISTANT_SEMICOLIN.search(s)
     self.assertTrue(matches)