forked from Mathics3/iwolfram
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.py
85 lines (64 loc) · 2.5 KB
/
test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
import unittest
import jupyter_kernel_test
class MyKernelTests(jupyter_kernel_test.KernelTests):
# Required --------------------------------------
# The name identifying an installed kernel to run the tests against
kernel_name = "wolfram_kernel"
# language_info.name in a kernel_info_reply should match this
language_name = "Mathematica"
# language_info.file_extension, should match kernel_info_reply
# (and start with a dot)
file_extension = ".m"
code_page_something = "? Print"
# Optional --------------------------------------
# Code in the kernel's language to write "hello, world" to stdout
code_hello_world = 'Print["hello, world"]\n'
# code which should print something to stderr
# code_stderr = 'OpenWrite["/proc"]'
# Samples of code which generate a result value (ie, some text
# displayed as Out[n])
code_execute_result = [{"code": "1+2+4", "result": "7"}]
# Samples of code which should generate a rich display output, and
# the expected MIME type
# TODO
code_display_data = [{"code": "Plot[x,{x,0,1}]", "mime": "image/png"}]
# Tab completions: in each dictionary, text is the input, which it will
# try to complete from the end of. matches is the collection of results
# it should expect.
# TODO
# completion_samples = []
# Code completeness: samples grouped by expected result
# # complete_code_samples = [
# 'Sin[1/2]',
# ]
# # incomplete_code_samples = [
# 'Sin[1',
# '1 +',
# '"abc ',
# ]
# # invalid_code_samples = [
# '{(1 + }2)',
# ]
# # Pager: code that should display something (anything) in the pager
# # TODO
# code_page_something = "?? 'Plus'"
# # Code which the frontend should display an error for
# code_generate_error = '{23,'
# # Which types of history access should be tested (omit this attribute
# # or use an empty list to test nothing). For history searching,
# # code_history_pattern should be a glob-type match for one of the
# # code strings in code_execute_result
# # TODO
# # supported_history_operations = ("tail", "range", "search")
# # code_history_pattern = "1?2*"
# # A statement/object to which the kernel should respond with some
# # information when inspected
# code_inspect_sample = "Sin"
# # Code which should cause the kernel to send a clear_output request
# # to the frontend
# # TODO
# # code_clear_output = "clear_output()"
# def subTest(code=None,hist_access_type=None, status=None):
# return True
if __name__ == "__main__":
unittest.main()