title: How to resolve "ValueError: Empty module name"?
body: <p>In my <code>UnitTest</code> directory, I have two files, <code>mymath.py</code> and <code>test_mymath.py</code>.</p>
  
  <p><code>mymath.py</code> file:</p>
  
  <pre><code>def add(a, b):
      return a + b
  
  def subtract(a, b):
      return a - b
  
  def multiply(a, b):
      return a * b
  
  def divide(numerator, denominator):
      return float(numerator) / denominator
  </code></pre>
  
  <p>And the <code>test_mymath.py</code> file is:</p>
  
  <pre><code>import mymath
  import unittest
  
  class TestAdd(unittest.TestCase):
      """
      Test the add function from the mymath library
      """
  
      def test_add_integer(self):
          """
          Test that the addition of two integers returns the correct total
          """
          result = mymath.add(1, 2)
          self.assertEqual(result, 3)
  
      def test_add_floats(self):
          """
          Test that the addition of two integers returns the correct total
          """
          result = mymath.add(10.5, 2)
          self.assertEqual(result, 12.5)
  
      def test_add_strings(self):
          """
          Test that the addition of two strings returns the two strings as one
          concatenated string
          """
          result = mymath.add('abc', 'def')
          self.assertEqual(result, 'abcdef')
  
  if __name__ == '__main__':
      unittest.main()
  </code></pre>
  
  <p>When I run the command </p>
  
  <p><code>python .\test_mymath.py
  </code></p>
  
  <p>I got the results </p>
  
  <blockquote>
    <p>Ran 3 tests in 0.000s</p>
    
    <p>OK</p>
  </blockquote>
  
  <p>But when I tried to run the test using</p>
  
  <p><code>python -m unittest .\test_mymath.py
  </code></p>
  
  <p>I got the error</p>
  
  <blockquote>
    <p>ValueError: Empty module name</p>
  </blockquote>
  
  <p>Traceback:
  <a href="https://i.stack.imgur.com/SdbqS.png" rel="noreferrer"><img src="https://i.stack.imgur.com/SdbqS.png" alt="Full Traceback"></a></p>
  
  <p>Folder Structure:
  <a href="https://i.stack.imgur.com/ipMjc.png" rel="noreferrer"><img src="https://i.stack.imgur.com/ipMjc.png" alt="enter image description here"></a></p>
  
  <p>I am following this <a href="https://www.blog.pythonlibrary.org/2016/07/07/python-3-testing-an-intro-to-unittest/" rel="noreferrer">article</a></p>
  
  <p>My python version is <code>Python 3.6.6</code> and I am using windows 10 in the local machine.</p>