为了编写单元测试,我们需要引入Python自带的 unittest 模块,编写 mydict_test.py 如下: ... assertEqual(abs(-1), 1) # 断言函数返回的结果与1相等.
確定! 回上一頁