擅长:python、mysql、java
<p>如python unittest<a href="https://docs.python.org/3/library/unittest.html" rel="noreferrer">doc</a>中所述:</p>
<blockquote>
<p>The simplest TestCase subclass will simply implement a test method
(i.e. a method whose name starts with test)</p>
</blockquote>
<p>因此,您需要将方法名称更改为以下内容:</p>
<pre><code>def test_add_returns_zero_for_emptyString(self):
self.assertEqual(Add(' '), 0)
</code></pre>