Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_fn_with_kwargs(self):
"fn() with keyword arguments."
pq.fn.test = lambda p=1: pq(this).eq(p) # NOQA
S = pq(self.html)
self.assertEqual(S('li').test(0).text(), 'Coffee')
self.assertEqual(S('li').test().text(), 'Tea')
self.assertEqual(S('li').test(p=2).text(), 'Milk')