Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6b1a3e4

Browse files
committed
[testing][tests][tools] Remove nose
1 parent cf20712 commit 6b1a3e4

1 file changed

Lines changed: 19 additions & 21 deletions

File tree

IPython/testing/tests/test_tools.py

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
import os
1818
import unittest
1919

20-
import nose.tools as nt
21-
2220
from IPython.testing import decorators as dec
2321
from IPython.testing import tools as tt
2422

@@ -28,26 +26,26 @@
2826

2927
@dec.skip_win32
3028
def test_full_path_posix():
31-
spath = '/foo/bar.py'
32-
result = tt.full_path(spath,['a.txt','b.txt'])
33-
nt.assert_equal(result, ['/foo/a.txt', '/foo/b.txt'])
34-
spath = '/foo'
35-
result = tt.full_path(spath,['a.txt','b.txt'])
36-
nt.assert_equal(result, ['/a.txt', '/b.txt'])
37-
result = tt.full_path(spath,'a.txt')
38-
nt.assert_equal(result, ['/a.txt'])
29+
spath = "/foo/bar.py"
30+
result = tt.full_path(spath, ["a.txt", "b.txt"])
31+
assert result, ["/foo/a.txt" == "/foo/b.txt"]
32+
spath = "/foo"
33+
result = tt.full_path(spath, ["a.txt", "b.txt"])
34+
assert result, ["/a.txt" == "/b.txt"]
35+
result = tt.full_path(spath, "a.txt")
36+
assert result == ["/a.txt"]
3937

4038

4139
@dec.skip_if_not_win32
4240
def test_full_path_win32():
43-
spath = 'c:\\foo\\bar.py'
44-
result = tt.full_path(spath,['a.txt','b.txt'])
45-
nt.assert_equal(result, ['c:\\foo\\a.txt', 'c:\\foo\\b.txt'])
46-
spath = 'c:\\foo'
47-
result = tt.full_path(spath,['a.txt','b.txt'])
48-
nt.assert_equal(result, ['c:\\a.txt', 'c:\\b.txt'])
49-
result = tt.full_path(spath,'a.txt')
50-
nt.assert_equal(result, ['c:\\a.txt'])
41+
spath = "c:\\foo\\bar.py"
42+
result = tt.full_path(spath, ["a.txt", "b.txt"])
43+
assert result, ["c:\\foo\\a.txt" == "c:\\foo\\b.txt"]
44+
spath = "c:\\foo"
45+
result = tt.full_path(spath, ["a.txt", "b.txt"])
46+
assert result, ["c:\\a.txt" == "c:\\b.txt"]
47+
result = tt.full_path(spath, "a.txt")
48+
assert result == ["c:\\a.txt"]
5149

5250

5351
def test_parser():
@@ -56,8 +54,8 @@ def test_parser():
5654
both = ("FAILED (errors=1, failures=1)", 1, 1)
5755
for txt, nerr, nfail in [err, fail, both]:
5856
nerr1, nfail1 = tt.parse_test_output(txt)
59-
nt.assert_equal(nerr, nerr1)
60-
nt.assert_equal(nfail, nfail1)
57+
assert nerr == nerr1
58+
assert nfail == nfail1
6159

6260

6361
def test_temp_pyfile():
@@ -66,7 +64,7 @@ def test_temp_pyfile():
6664
assert os.path.isfile(fname)
6765
with open(fname) as fh2:
6866
src2 = fh2.read()
69-
nt.assert_equal(src2, src)
67+
assert src2 == src
7068

7169
class TestAssertPrints(unittest.TestCase):
7270
def test_passing(self):

0 commit comments

Comments
 (0)