Learn practical skills, build real-world projects, and advance your career
#export
import operator

def test(a,b,cmp,cname=None):
  if cname is None: cname=cmp.__name__
  assert cmp(a, b),f"{cname}:\n{a}\n{b}"
  
def test_eq(a, b): test(a,b,operator.eq,'==')
test_eq(123, 123)

Export

!python notebook2script.py 00_tests.ipynb
Converted 00_tests.ipynb to exp/nb_00.py