Skip to content

Commit

Permalink
ignore blank lines in test cells
Browse files Browse the repository at this point in the history
  • Loading branch information
chrispyles committed Jan 27, 2024
1 parent 4189aa0 commit b6363a5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* Fixed an error causing intercell seeding code to be added to cells using cell magic commands which caused syntax errors per [#754](https://github.com/ucbds-infra/otter-grader/issues/754)
* Add support for submitting the PDF uploaded in a submission for manual grading instead of generating a new one per [#764](https://github.com/ucbds-infra/otter-grader/issues/764)
* Validate that a course ID and assignment ID were provided before attempting PDF upload
* Updated Otter Assign to ignore blank or whitespace-only lines in test cells per [#718](https://github.com/ucbds-infra/otter-grader/issues/718)

**v5.2.3:**

Expand Down
2 changes: 1 addition & 1 deletion otter/assign/tests_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ def _create_ok_test_case(test_case: TestCase):
inp = test_case.input
if hasattr(ast, "unparse"):
inp = ast.unparse(ast.parse(test_case.input))
code_lines = str_to_doctest(inp.split('\n'), [])
code_lines = str_to_doctest([l for l in inp.split('\n') if l.strip()], [])
code_lines.append(test_case.output)

ret = {
Expand Down

0 comments on commit b6363a5

Please sign in to comment.