Show More
@@ -1,4 +1,3 b'' | |||||
1 | import nose.tools as nt |
|
|||
2 |
|
|
1 | from IPython.utils.dir2 import dir2 | |
3 |
|
2 | |||
4 |
|
3 | |||
@@ -9,12 +8,13 b' class Base(object):' | |||||
9 |
|
8 | |||
10 | def test_base(): |
|
9 | def test_base(): | |
11 | res = dir2(Base()) |
|
10 | res = dir2(Base()) | |
12 |
assert |
|
11 | assert "x" in res | |
13 |
assert |
|
12 | assert "z" in res | |
14 |
assert |
|
13 | assert "y" not in res | |
15 |
assert |
|
14 | assert "__class__" in res | |
16 |
|
|
15 | assert res.count("x") == 1 | |
17 |
|
|
16 | assert res.count("__class__") == 1 | |
|
17 | ||||
18 |
|
18 | |||
19 | def test_SubClass(): |
|
19 | def test_SubClass(): | |
20 |
|
20 | |||
@@ -22,9 +22,9 b' def test_SubClass():' | |||||
22 | y = 2 |
|
22 | y = 2 | |
23 |
|
23 | |||
24 | res = dir2(SubClass()) |
|
24 | res = dir2(SubClass()) | |
25 |
assert |
|
25 | assert "y" in res | |
26 |
|
|
26 | assert res.count("y") == 1 | |
27 |
|
|
27 | assert res.count("x") == 1 | |
28 |
|
28 | |||
29 |
|
29 | |||
30 | def test_SubClass_with_trait_names_attr(): |
|
30 | def test_SubClass_with_trait_names_attr(): |
General Comments 0
You need to be logged in to leave comments.
Login now