From 8f46817510f3e0b2b6ff2aa51c66955beb87bf9b Mon Sep 17 00:00:00 2001 From: campbelle2 Date: Thu, 30 Jun 2022 13:58:23 -0400 Subject: [PATCH 1/2] removed visible instructor text --- pretext/UnitTesting/WritingUnitTests.ptx | 25 +----------------------- 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/pretext/UnitTesting/WritingUnitTests.ptx b/pretext/UnitTesting/WritingUnitTests.ptx index df9c9482..fc03ac76 100644 --- a/pretext/UnitTesting/WritingUnitTests.ptx +++ b/pretext/UnitTesting/WritingUnitTests.ptx @@ -162,30 +162,7 @@ assert grade(92) == 'A' assert grade(85) == 'B' assert grade(69) == 'F' - .. reveal:: ac_grade_unittest_aux_reveal - :instructoronly: - .. actex:: ac_grade_unittest_aux - testA = False - testB = False - testF = False - illegal = False - def grade(score): - global illegal, testA, testB, testF - if score > 100 or score < 0: - illegal = True - return '' - elif score >= 90: - testA = True - return 'A' - elif score >= 80: - testB = True - return 'B' - else: - testF = True - return 'F' - -

The following asserts are just some of several that could have been used.

- + From f6e3faba158004166e090627786c4e28af72855f Mon Sep 17 00:00:00 2001 From: campbelle2 Date: Wed, 13 Jul 2022 12:27:44 -0400 Subject: [PATCH 2/2] added commentary tags to WritingUnitTests --- pretext/UnitTesting/WritingUnitTests.ptx | 45 ++++++++++++------------ 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/pretext/UnitTesting/WritingUnitTests.ptx b/pretext/UnitTesting/WritingUnitTests.ptx index fc03ac76..10e92aa6 100644 --- a/pretext/UnitTesting/WritingUnitTests.ptx +++ b/pretext/UnitTesting/WritingUnitTests.ptx @@ -163,28 +163,29 @@ assert grade(85) == 'B' assert grade(69) == 'F' - - - - - - - - - - - - - - - - - - - - - - + + ac_grade_unittest_aux_reveal + instructoronly + actex:: ac_grade_unittest_aux + testA = False + testB = False + testF = False + illegal = False + def grade(score): + global illegal, testA, testB, testF + if score > 100 or score < 0: + illegal = True + return '' + elif score >= 90: + testA = True + return 'A' + elif score >= 80: + testB = True + return 'B' + else: + testF = True + return 'F' +