File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed
Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change 1+ """
2+ Tests for functions in inspect submodule.
3+ """
4+
5+ from scyjava import inspect
6+ from scyjava .config import mode , Mode
7+
8+
9+ class TestInspect (object ):
10+ """
11+ Test scyjava.inspect convenience functions.
12+ """
13+
14+ def test_inspect_members (self ):
15+ if mode == Mode .JEP :
16+ # JEP does not support the jclass function.
17+ return
18+ members = []
19+ inspect .members ("java.lang.Iterable" , writer = members .append )
20+ expected = [
21+ "Source code URL: java.lang.NullPointerException" ,
22+ " * indicates static modifier" ,
23+ "java.util.Iterator = iterator()" ,
24+ "java.util.Spliterator = spliterator()" ,
25+ "void = forEach(java.util.function.Consumer)" ,
26+ "" ,
27+ "" ,
28+ ]
29+ assert expected == "" .join (members ).split ("\n " )
You can’t perform that action at this time.
0 commit comments