-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #69 from blink1073/add-julia-test
Add xeus-cling test
- Loading branch information
Showing
5 changed files
with
59 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
include *.py | ||
include *.md | ||
exclude setup_julia.sh | ||
exclude environment.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
""" | ||
A non-python example, with tests for IRKernel (irkernel.github.io). | ||
(Beware of python quoting/string escaping rules being different to the | ||
language being tested) | ||
""" | ||
|
||
import unittest | ||
import shutil | ||
|
||
from jupyter_client.kernelspec import NoSuchKernel | ||
import jupyter_kernel_test as jkt | ||
|
||
|
||
class XeusClingKernelTests(jkt.KernelTests): | ||
kernel_name = "xcpp17" | ||
|
||
@classmethod | ||
def setUpClass(cls): | ||
try: | ||
cls.km, cls.kc = jkt.start_new_kernel(kernel_name=cls.kernel_name) | ||
except NoSuchKernel: | ||
raise unittest.SkipTest('Xeus-Cling Kernel not installed') | ||
|
||
language_name = "c++" | ||
|
||
file_extension = ".cpp" | ||
|
||
code_hello_world = '#include <iostream>\nstd::cout << "hello, world!" << std::endl;' | ||
|
||
code_stderr = '#include <iostream>\nstd::cerr << "some error" << std::endl;' | ||
|
||
complete_code_samples = ['1', "int j=5"] | ||
incomplete_code_samples = ["double sqr(double a"] | ||
|
||
code_generate_error = 'throw std::runtime_error("Unknown exception");' | ||
|
||
code_execute_result = [ | ||
{'code': 'int j = 5;j', 'result': "5"}, | ||
] | ||
|
||
|
||
if __name__ == '__main__': | ||
unittest.main() |