(self)
| 304 | ) |
| 305 | |
| 306 | def test_int_limit_offset_coercion(self): |
| 307 | for given, exp in [ |
| 308 | ("5", 5), |
| 309 | (5, 5), |
| 310 | (5.2, 5), |
| 311 | (decimal.Decimal("5"), 5), |
| 312 | (None, None), |
| 313 | ]: |
| 314 | eq_(select().limit(given)._limit, exp) |
| 315 | eq_(select().offset(given)._offset, exp) |
| 316 | |
| 317 | assert_raises(ValueError, select().limit, "foo") |
| 318 | assert_raises(ValueError, select().offset, "foo") |
| 319 | |
| 320 | def test_limit_offset_no_int_coercion_one(self): |
| 321 | exp1 = literal_column("Q") |
nothing calls this directly
no test coverage detected