私が受け取っているトレースバックエラーを理解しようとしています。下記参照。トレースバックエラーを理解する
Traceback (most recent call last):
File "test.py", line 291, in test_cache_in_function
self.assertTrue("sunset" in testfilestr,"Testing that the sunset request was cached")
AssertionError: Testing that the sunset request was cached
上記のエラーは、 "sunset"がキャッシュファイルに存在しないことを意味しますか?
"sunset"という文字列が 'testfilestr'に存在しないので、' assertTrue'は失敗します。 –
はい。なぜあなたは文字列を印刷しないのですか? –
最初のtry-catchブロックを見てください。 'saved_cache'と' CACHE_DICTION'の2つの変数名があります。私は第2のものだけが正しいと推測するつもりです。 –