Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Formatting cell output and catching syntax errors #127

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

Merged
merged 11 commits into from
Jul 12, 2023
Merged

Conversation

despadam
Copy link
Contributor

@despadam despadam commented Jul 10, 2023

Based on @baffelli 's implementation of testsuite.py from branch fix/show-test-output, this branch was created from main and contains additional logic in order to:

  • Catch syntax errors, using a try-expect block
  • Print user output: only print statements written inside the solution functions, all other outputs are disregarded
  • Provide readable output when a test fails

Some Javascript logic was added in order to format the syntax error output. We keep the output as is, but rearrange its position so that it is consistent with the rest of the test result formatting.

@despadam despadam linked an issue Jul 10, 2023 that may be closed by this pull request
@despadam despadam requested review from baffelli and edoardob90 July 10, 2023 10:09
tutorial/tests/testsuite.py Outdated Show resolved Hide resolved
tutorial/tests/testsuite.py Outdated Show resolved Hide resolved
despadam and others added 3 commits July 10, 2023 14:44
Merging latest changes from main
Co-authored-by: Edoardo Baldi <edoardob90@gmail.com>
tutorial/tests/testsuite.py Show resolved Hide resolved
tutorial/tests/testsuite.py Outdated Show resolved Hide resolved
tutorial/tests/testsuite.py Outdated Show resolved Hide resolved
tutorial/tests/testsuite.py Outdated Show resolved Hide resolved
magic_example.ipynb Outdated Show resolved Hide resolved
tutorial/tests/testsuite.py Outdated Show resolved Hide resolved
Co-authored-by: Edoardo Baldi <edoardo.baldi@empa.ch>
baffelli
baffelli previously approved these changes Jul 12, 2023
Fix bug in test to I/O exercise 4 (#129)
@edoardob90 edoardob90 self-requested a review July 12, 2023 08:13
tutorial/tests/testsuite.py Outdated Show resolved Hide resolved
@edoardob90 edoardob90 merged commit 525b2e2 into main Jul 12, 2023
@edoardob90 edoardob90 deleted the improve-test-output branch July 12, 2023 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve test output
3 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.