<<Programming Lab Reports
goal: design and implement data structures in labs and practice python programming
Lab1¶
Problem: correlation
Lab 2 snekoban¶
Problem 0: why assertion in test fails while it can run correctly in the GUI?
Answer: do not modify the input game.
time: stuck for one hour
where (goes wrong): Figured out in assertionErrors in vscode: somehow the pytest in pycharm lost the critical information: modify the input game type
Experiment 1: disable the assertions for checking modifications
Result: passed all the basic tests.
Experiment 2: is dict deep copied?
Result: no. It turns out that dict(some_dict) or some_dict.copy() is shallow copy. Deep copy should use copy.deepcopy(some_dict) or be a lamb :) to copy every element in the dict.
Thus it solves the problem.