(self)
| 54 | self.assertEqual(set(q2), {1}) |
| 55 | |
| 56 | def test_3(self): |
| 57 | x = 'Great' |
| 58 | |
| 59 | q = select(f'{p.first_name!s} the {x}' for p in Person if p.id == 1) |
| 60 | self.assertEqual(set(q), {'Alexander the Great'}) |
| 61 | |
| 62 | q2 = select("""f'{p.first_name!s} the {x}' for p in Person if p.id == 1""") |
| 63 | self.assertEqual(set(q2), {'Alexander the Great'}) |
| 64 | |
| 65 | def test_4(self): |
| 66 | q = select(f'{p.first_name} {p.age}' for p in Person if p.id == 1) |