otter-grader icon indicating copy to clipboard operation
otter-grader copied to clipboard

Strip type annotations from generated test files in Otter Assign

Open chrispyles opened this issue 10 months ago • 0 comments

Since the exception-based test files generated by Otter Assign don't import anything except for the test_case decorator, any type annotations using the typing library or others will throw a NameError when executing the file.

def test_1(arr: np.ndarray):
    assert arr.shape == (3, 2)

Instead, Otter Assign should strip type annotations from the code it writes into these test files.

chrispyles avatar Apr 17 '24 03:04 chrispyles