擅长:python、mysql、java
<p>您可以使用<code>self._testMethodName</code>。这是<a href="https://github.com/python/cpython/blob/e42b705188271da108de42b55d9344642170aa2b/Lib/unittest/case.py#L403" rel="noreferrer">inherited from the ^{<cd2>}</a>父类。</p>
<pre><code>def setUp():
print "In method", self._testMethodName
</code></pre>