We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5fe1461 commit 2f11f0dCopy full SHA for 2f11f0d
1 file changed
tests/test_inspect.py
@@ -0,0 +1,29 @@
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")
0 commit comments