Skip to content

[WIP ] Fix failing Windows XCppTests #119

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ jobs:
call C:\Users\runneradmin\micromamba-root\condabin\micromamba.bat activate xeus-cpp
mkdir -p build
cd build
ls "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.29.30133\include"
cmake .. -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -DXEUS_BUILD_TESTS=ON -DDEPENDENCY_SEARCH_PREFIX="%CONDA_PREFIX%\Library" -DCMAKE_PREFIX_PATH="%CONDA_PREFIX%\Library" -DCMAKE_INSTALL_PREFIX="%CONDA_PREFIX%"

- name: cmake configure
Expand Down
25 changes: 23 additions & 2 deletions test/test_xcpp_kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,32 @@ class XCppTests(jupyter_kernel_test.KernelTests):
}
#include "xcpp/xdisplay.hpp"
im::image marie("../notebooks/images/marie.png");
xcpp::display(marie);""",
xcpp::display(marie);
""",
'mime': 'image/png'
}
]

if platform.system() == 'Windows':
class XCppTests(jupyter_kernel_test.KernelTests):

kernel_name = 'xcpp20'

# language_info.name in a kernel_info_reply should match this
language_name = 'C++'

code_err="""
#include <iostream>
std::cerr << "oops" << std::endl;
"""

def test_xcpp_err(self):
self.flush_channels()
reply, output_msgs = self.execute_helper(code=self.code_err)
print(output_msgs)
self.assertEqual(output_msgs[0]['msg_type'], 'stream')
self.assertEqual(output_msgs[0]['content']['name'], 'stderr')
self.assertEqual(output_msgs[0]['content']['text'], 'oops\n')

class XCppTests2(jupyter_kernel_test.KernelTests):

Expand All @@ -145,4 +166,4 @@ class XCppTests2(jupyter_kernel_test.KernelTests):


if __name__ == '__main__':
unittest.main()
unittest.main()
Loading