Skip to content

Commit 4faafc3

Browse files
committed
small cosmetic updates to 00_test.ipynb
no functional changes
1 parent 86337ba commit 4faafc3

File tree

3 files changed

+19
-15
lines changed

3 files changed

+19
-15
lines changed

fastcore/_modidx.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,4 +594,4 @@
594594
'fastcore.xtras.truncstr': ('xtras.html#truncstr', 'fastcore/xtras.py'),
595595
'fastcore.xtras.untar_dir': ('xtras.html#untar_dir', 'fastcore/xtras.py'),
596596
'fastcore.xtras.utc2local': ('xtras.html#utc2local', 'fastcore/xtras.py'),
597-
'fastcore.xtras.walk': ('xtras.html#walk', 'fastcore/xtras.py')}}}
597+
'fastcore.xtras.walk': ('xtras.html#walk', 'fastcore/xtras.py')}}}

fastcore/test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@
1212

1313
# %% ../nbs/00_test.ipynb 6
1414
def test_fail(f, msg='', contains='', args=None, kwargs=None):
15-
args, kwargs = args or [], kwargs or {}
1615
"Fails with `msg` unless `f()` raises an exception and (optionally) has `contains` in `e.args`"
16+
args, kwargs = args or [], kwargs or {}
1717
try: f(*args, **kwargs)
1818
except Exception as e:
1919
assert not contains or contains in str(e)
2020
return
2121
assert False,f"Expected exception but none raised. {msg}"
2222

2323
# %% ../nbs/00_test.ipynb 10
24-
def test(a, b, cmp,cname=None):
24+
def test(a, b, cmp, cname=None):
2525
"`assert` that `cmp(a,b)`; display inputs and `cname or cmp.__name__` if it fails"
2626
if cname is None: cname=cmp.__name__
2727
assert cmp(a,b),f"{cname}:\n{a}\n{b}"
@@ -34,7 +34,7 @@ def nequals(a,b):
3434
# %% ../nbs/00_test.ipynb 20
3535
def test_eq(a,b):
3636
"`test` that `a==b`"
37-
test(a,b,equals, '==')
37+
test(a,b,equals, cname='==')
3838

3939
# %% ../nbs/00_test.ipynb 25
4040
def test_eq_type(a,b):

nbs/00_test.ipynb

Lines changed: 15 additions & 11 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)