diff --git a/README.md b/README.md index a279873fb8c98611966bf750625ae5bb3a6eb40f..9f1d1aafa20a02c33cd271f927548ab5dbc600b3 100644 --- a/README.md +++ b/README.md @@ -217,83 +217,34 @@ class Week1Titles(UTestCase): When this is run, the titles are shown as follows: ```terminal _ _ _ _ _____ _ - | | | | (_) | | __ \ | | - | | | |_ __ _| |_| | \/_ __ __ _ __| | ___ - | | | | '_ \| | __| | __| '__/ _` |/ _` |/ _ \ - | |_| | | | | | |_| |_\ \ | | (_| | (_| | __/ + \___/|_| |_|_|\__|\____/_| \__,_|\__,_|\___| v0.1.17, started: 20/09/2021 19:01:29 + +CS 102 Report 2 +Question 1: Week1 + * q1.1) test_add...................................................................................................PASS + * q1.2) test_reverse...............................................................................................PASS + * q1.3) test_output_capture........................................................................................PASS + * q1) Total.................................................................................................... 10/10 + +Question 2: The same problem as before with nicer titles + * q2.1) Test the addition method add(a,b)..........................................................................PASS + * q2.2) Checking if reverse_list([1, 2, 3]) = [3, 2, 1]............................................................PASS + * q2) Total...................................................................................................... 6/6 + +Total points at 19:01:29 (0 minutes, 0 seconds)....................................................................16/16 + +Including files in upload... + * cs102 +> Testing token file integrity... +Done! + +To get credit for your results, please upload the single unmodified file: +> C:\Users\tuhe\Documents\unitgrade_private\examples\example_framework\instructor\cs102\Report2_handin_16_of_16.token - \___/|_| |_|_|\__|\____/_| \__,_|\__,_|\___| v0.1.17, started: 20/09/2021 18:56:39 - -[0m - -[0mCS 102 Report 2[0m [0m[0m - -[0mQuestion 1: Week1[0m[0m -Question 1: Week1: 0%| | [00:00<?][0m[0m - [0m -[0mQuestion 1: Week1[0m[0m [0m - -[0m - * q1.1) test_add: 0%| | [00:00<?][0m[0m - [0m -[0m * q1.1) test_add...................................................................................................[0m[0mPASS[0m - -[0m - * q1.2) test_reverse: 0%| | [00:00<?][0m[0m - [0m -[0m * q1.2) test_reverse...............................................................................................[0m[0mPASS[0m - -[0m - * q1.3) test_output_capture: 0%| | [00:00<?][0m[0m - [0m -[0m * q1.3) test_output_capture........................................................................................[0m[0mPASS[0m - -[0m * q1) Total.................................................................................................... 10/10[0m - -[0m [0m - -[0mQuestion 2: The same problem as before with nicer titles[0m[0m -Question 2: The same problem as before with nicer titles: 0%| | [00:00<?][0m[0m - [0m -[0mQuestion 2: The same problem as before with nicer titles[0m[0m [0m - -[0m - * q2.1) Test the addition method add(a,b): 0%| | [00:00<?][0m[0m - [0m -[0m * q2.1) Test the addition method add(a,b)..........................................................................[0m[0mPASS[0m - -[0m - * q2.2) Checking if reverse_list([1, 2, 3]) = [3, 2, 1]: 0%| | [00:00<?][0m[0m - [0m -[0m * q2.2) Checking if reverse_list([1, 2, 3]) = [3, 2, 1]............................................................[0m[0mPASS[0m - -[0m * q2) Total...................................................................................................... 6/6[0m - -[0m [0m - -[0mTotal points at 18:56:39 (0 minutes, 0 seconds)....................................................................[0m[0m16/16[0m - -[0m[0m - -[0mIncluding files in upload...[0m - -[0m * cs102[0m - -[0m> Testing token file integrity...[0m - -[0mDone![0m - -[0m [0m - -[0mTo get credit for your results, please upload the single unmodified file: [0m - -[0m>[0m [0mC:\Users\tuhe\Documents\unitgrade_private\examples\example_framework\instructor\cs102\Report2_handin_16_of_16.token[0m - -[0m[0m ``` What happens behind the scenes when we set `self.title` is that the result is pre-computed on the instructors machine and cached. This means the last test will display the correct result regardless of how `reverse_list` has been implemented by the student. The titles are also shown correctly when the method is run as a unittest. diff --git a/docs/build_docs.py b/docs/build_docs.py index e1d86b709773fb619d6f439e2e82a1e4c95f6e7a..057ace96f77e36f3d0ff31a90a0b30d50d7c1042 100644 --- a/docs/build_docs.py +++ b/docs/build_docs.py @@ -29,8 +29,12 @@ if __name__ == "__main__": import os import subprocess # with Capturing2() as c: - out = subprocess.check_output("cd ../examples/example_framework/instructor && python -m cs102.report2_grade", shell=True) - out = out.decode("utf-8") + # out = subprocess.check_output("cd ../examples/example_framework/instructor && python -m cs102.report2_grade", shell=True) + out = subprocess.check_output("cd ../examples/example_framework/instructor && python -m cs102.report2_grade --noprogress", shell=True, encoding='utf8', errors='strict') + out = out.replace("", "") + out = out.replace("[0m", "") + + # out = out.decode("utf-8") with open("snips/deploy.txt", 'w') as f: f.write(out) # os.system("cd ../examples/example_framework/instructor && python -m cs102.report2_grade") diff --git a/docs/snips/deploy.txt b/docs/snips/deploy.txt index cd05147a2c211a2ee5e5f7254c151d01dba58673..11359acd3447da969e536923efa5df2601daf49a 100644 --- a/docs/snips/deploy.txt +++ b/docs/snips/deploy.txt @@ -1,29 +1,28 @@ - _ _ _ _ _____ _ -| | | | (_) | | __ \ | | -| | | |_ __ _| |_| | \/_ __ __ _ __| | ___ -| | | | '_ \| | __| | __| '__/ _` |/ _` |/ _ \ -| |_| | | | | | |_| |_\ \ | | (_| | (_| | __/ - \___/|_| |_|_|\__|\____/_| \__,_|\__,_|\___| v0.1.17, started: 20/09/2021 18:57:44 -[0m -[0mCS 102 Report 2[0m [0m[0m -[0mQuestion 1: Week1[0m[0m Question 1: Week1: 0%| | [00:00<?][0m[0m [0m [0mQuestion 1: Week1[0m[0m [0m -[0m * q1.1) test_add: 0%| | [00:00<?][0m[0m [0m [0m * q1.1) test_add...................................................................................................[0m[0mPASS[0m -[0m * q1.2) test_reverse: 0%| | [00:00<?][0m[0m [0m [0m * q1.2) test_reverse...............................................................................................[0m[0mPASS[0m -[0m * q1.3) test_output_capture: 0%| | [00:00<?][0m[0m [0m [0m * q1.3) test_output_capture........................................................................................[0m[0mPASS[0m -[0m * q1) Total.................................................................................................... 10/10[0m -[0m [0m -[0mQuestion 2: The same problem as before with nicer titles[0m[0m Question 2: The same problem as before with nicer titles: 0%| | [00:00<?][0m[0m [0m [0mQuestion 2: The same problem as before with nicer titles[0m[0m [0m -[0m * q2.1) Test the addition method add(a,b): 0%| | [00:00<?][0m[0m [0m [0m * q2.1) Test the addition method add(a,b)..........................................................................[0m[0mPASS[0m -[0m * q2.2) Checking if reverse_list([1, 2, 3]) = [3, 2, 1]: 0%| | [00:00<?][0m[0m [0m [0m * q2.2) Checking if reverse_list([1, 2, 3]) = [3, 2, 1]............................................................[0m[0mPASS[0m -[0m * q2) Total...................................................................................................... 6/6[0m -[0m [0m -[0mTotal points at 18:57:44 (0 minutes, 0 seconds)....................................................................[0m[0m16/16[0m -[0m[0m -[0mIncluding files in upload...[0m -[0m * cs102[0m -[0m> Testing token file integrity...[0m -[0mDone![0m -[0m [0m -[0mTo get credit for your results, please upload the single unmodified file: [0m -[0m>[0m [0mC:\Users\tuhe\Documents\unitgrade_private\examples\example_framework\instructor\cs102\Report2_handin_16_of_16.token[0m -[0m[0m \ No newline at end of file + _ _ _ _ _____ _ +| | | | (_) | | __ \ | | +| | | |_ __ _| |_| | \/_ __ __ _ __| | ___ +| | | | '_ \| | __| | __| '__/ _` |/ _` |/ _ \ +| |_| | | | | | |_| |_\ \ | | (_| | (_| | __/ + \___/|_| |_|_|\__|\____/_| \__,_|\__,_|\___| v0.1.17, started: 20/09/2021 19:01:38 + +CS 102 Report 2 +Question 1: Week1 + * q1.1) test_add...................................................................................................PASS + * q1.2) test_reverse...............................................................................................PASS + * q1.3) test_output_capture........................................................................................PASS + * q1) Total.................................................................................................... 10/10 + +Question 2: The same problem as before with nicer titles + * q2.1) Test the addition method add(a,b)..........................................................................PASS + * q2.2) Checking if reverse_list([1, 2, 3]) = [3, 2, 1]............................................................PASS + * q2) Total...................................................................................................... 6/6 + +Total points at 19:01:38 (0 minutes, 0 seconds)....................................................................16/16 + +Including files in upload... + * cs102 +> Testing token file integrity... +Done! + +To get credit for your results, please upload the single unmodified file: +> C:\Users\tuhe\Documents\unitgrade_private\examples\example_framework\instructor\cs102\Report2_handin_16_of_16.token