(self)
| 1027 | ) |
| 1028 | |
| 1029 | def test_startswith(self): |
| 1030 | op = operators.get_operator("startswith") |
| 1031 | self.assertTrue(op("hasystack needle haystack", "hasystack")) |
| 1032 | self.assertTrue(op("a hasystack needle haystack", "a ")) |
| 1033 | |
| 1034 | # Mixing bytes and strings / unicode should still work |
| 1035 | self.assertTrue(op(b"haystack needle", "haystack")) |
| 1036 | self.assertTrue(op("haystack needle", b"haystack")) |
| 1037 | self.assertTrue(op(b"haystack needle", b"haystack")) |
| 1038 | self.assertTrue(op(b"haystack needle", "haystack")) |
| 1039 | self.assertTrue(op("haystack needle", b"haystack")) |
| 1040 | |
| 1041 | def test_startswith_fail(self): |
| 1042 | op = operators.get_operator("startswith") |
nothing calls this directly
no outgoing calls
no test coverage detected