Skip to content

Commit 0d7c0d7

Browse files
committed
extend tests to homeworks in Markdown
1 parent 9322ab0 commit 0d7c0d7

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@
55
"[json]": {
66
"editor.formatOnSave": false
77
},
8-
"workbench.externalBrowser": "chrome"
8+
"workbench.externalBrowser": "chrome",
9+
"editor.formatOnSaveMode": "modifications"
910
}

extras/test_homeworks.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,12 @@
88
hw_notebooks = glob("hw_*.ipynb")
99
hw_notebooks.sort()
1010

11+
hw_markdown = glob("hw_*.md")
12+
hw_markdown.sort()
13+
1114

1215
@pytest.mark.parametrize("file", hw_notebooks)
13-
def test_reminders(file):
16+
def test_notebook_reminders(file):
1417
notebook = read_notebook(file)
1518

1619
assert any(
@@ -20,3 +23,12 @@ def test_reminders(file):
2023
assert any(
2124
"participation" in cell.source for cell in notebook.cells
2225
), "Missing participation reminder"
26+
27+
28+
@pytest.mark.parametrize("file", hw_markdown)
29+
def test_markdown_reminders(file):
30+
with open(file) as f:
31+
homework = f.read()
32+
33+
assert "assignments.md" in homework, "Missing assignment submission instructions"
34+
assert "participation" in homework, "Missing participation reminder"

0 commit comments

Comments
 (0)