Jovian
⭐️
Sign In
In [6]:
#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,'==')
In [9]:
test_eq(123, 123)

Export

In [10]:
!python notebook2script.py 00_tests.ipynb
Converted 00_tests.ipynb to exp/nb_00.py
In [ ]: