<p>更新到2016.2版后,我得到了</p>
<pre><code>RuntimeWarning: Parent module 'tests' not found while handling absolute import
import unittest
RuntimeWarning: Parent module 'tests' not found while handling absolute import
import datetime as dt
</code></pre>
<p>“tests”是主应用程序包中的一个包,当我尝试在此文件夹中执行单元测试时,会收到这些警告。此问题仅在更新到2016.2后出现。除了警告之外,其余的代码工作正常。</p>
<p>编辑:这是一个已知的问题-<a href="https://youtrack.jetbrains.com/issue/PY-20171">https://youtrack.jetbrains.com/issue/PY-20171</a>。他们建议替换PyCharm安装文件夹中的utrunner.py。</p>