これはおそらくばかげた質問です。
私はpythondoctestを試していますが、この例を実行しようとしています
で終わる
if __name__ == "__main__":
import doctest
doctest.testfile("example.txt")
サンプルコードを含むソースファイルと同じフォルダに「example.txt」を配置しましたが、次のエラーが発生します。
Traceback (most recent call last):
File "test_av_funktioner.py", line 61, in <module>
doctest.testfile("example.txt")
File "C:\Python26\lib\doctest.py", line 1947, in testfile
text, filename = _load_testfile(filename, package, module_relative)
File "C:\Python26\lib\doctest.py", line 219, in _load_testfile
return open(filename).read(), filename
IOError: [Errno 2] No such file or directory: 'example.txt'
doctestモジュールが指定されたファイルを検索している場所をどうにかして教えたり設定したりできますか?