Skip to content

Commit 561140f

Browse files
authored
Merge pull request #514 from fastai/revert-507-patch/00_test
Revert "extend test_eq_type"
2 parents 033c395 + 9d9c066 commit 561140f

File tree

4 files changed

+5
-10
lines changed

4 files changed

+5
-10
lines changed

fastcore/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "1.5.29"
1+
__version__ = "1.5.28"

fastcore/test.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@ def test_eq_type(a,b):
4141
"`test` that `a==b` and are same type"
4242
test_eq(a,b)
4343
test_eq(type(a),type(b))
44-
if isinstance(a,(list,tuple)): test_eq(map(type,a),map(type,b)) # type of each element
45-
if isinstance(a, (torch.Tensor, pd.Series, np.ndarray)): test_eq(a.dtype, b.dtype) # dtypes of both tensors
44+
if isinstance(a,(list,tuple)): test_eq(map(type,a),map(type,b))
4645

4746
# %% ../nbs/00_test.ipynb 27
4847
def test_ne(a,b):

nbs/00_test.ipynb

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -339,8 +339,7 @@
339339
" \"`test` that `a==b` and are same type\"\n",
340340
" test_eq(a,b)\n",
341341
" test_eq(type(a),type(b))\n",
342-
" if isinstance(a,(list,tuple)): test_eq(map(type,a),map(type,b)) # type of each element\n",
343-
" if isinstance(a, (torch.Tensor, pd.Series, np.ndarray)): test_eq(a.dtype, b.dtype) # dtypes of both tensors"
342+
" if isinstance(a,(list,tuple)): test_eq(map(type,a),map(type,b))"
344343
]
345344
},
346345
{
@@ -355,10 +354,7 @@
355354
"test_fail(lambda: test_eq_type(1,1.))\n",
356355
"test_eq_type([1,1],[1,1])\n",
357356
"test_fail(lambda: test_eq_type([1,1],(1,1)))\n",
358-
"test_fail(lambda: test_eq_type([1,1],[1,1.]))\n",
359-
"test_fail(lambda: test_eq_type(torch.zeros(10), torch.zeros(10, dtype=torch.float64)))\n",
360-
"test_fail(lambda: test_eq_type(torch.zeros(10), np.zeros(10)))\n",
361-
"test_eq_type(torch.zeros(3), torch.Tensor([0, 0, 0]))"
357+
"test_fail(lambda: test_eq_type([1,1],[1,1.]))"
362358
]
363359
},
364360
{

settings.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ author = Jeremy Howard and Sylvain Gugger
88
author_email = infos@fast.ai
99
copyright = fast.ai
1010
branch = master
11-
version = 1.5.29
11+
version = 1.5.28
1212
min_python = 3.7
1313
audience = Developers
1414
language = English

0 commit comments

Comments
 (0)