(self)
| 1067 | ) |
| 1068 | |
| 1069 | def test_as_comparison(self): |
| 1070 | fn = func.substring("foo", "foobar").as_comparison(1, 2) |
| 1071 | is_(fn.type._type_affinity, Boolean) |
| 1072 | |
| 1073 | self.assert_compile( |
| 1074 | fn.left, ":substring_1", checkparams={"substring_1": "foo"} |
| 1075 | ) |
| 1076 | self.assert_compile( |
| 1077 | fn.right, ":substring_1", checkparams={"substring_1": "foobar"} |
| 1078 | ) |
| 1079 | |
| 1080 | self.assert_compile( |
| 1081 | fn, |
| 1082 | "substring(:substring_1, :substring_2)", |
| 1083 | checkparams={"substring_1": "foo", "substring_2": "foobar"}, |
| 1084 | ) |
| 1085 | |
| 1086 | def test_as_comparison_annotate(self): |
| 1087 | fn = func.foobar("x", "y", "q", "p", "r").as_comparison(2, 5) |
nothing calls this directly
no test coverage detected