MCPcopy
hub / github.com/ponyorm/pony / test_3

Method test_3

pony/orm/tests/test_f_strings.py:56–63  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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)

Callers

nothing calls this directly

Calls 1

selectFunction · 0.85

Tested by

no test coverage detected