title: Python unit testing multiple inputs
body: <p>This is a generic question geared towards unit testing specifically in Python. Is it acceptable to place 20 or some number of inputs to test in a dictionary as keys, where the values are the expected result output from the function?</p>
  
  <p>I can't find an answer after scouring the internet. Almost everything I read were toy examples like adding numbers to obtain a sum or concatenating a first and last name. The following is another toyish example to describe my question in a simple way.</p>
  
  <pre><code>import unittest
  import some_module
  
  class SomeModuleUnitTest(unittest.TestCase):
  
      def test_some_function(self):
  
          input_output_dict = {
              1: 1,
              2: 4,
              3: 9,
              4: 16,
              5: 25,
              6: 36,
              7: 49,
                .
                .
                .
  
              20: 400
          }
  
          for input_case, output_expected in input_output_dict.items():
              output_actual = some_module.some_function(input_case)
              self.assertEqual(output_expected, output_actual)
  </code></pre>
  
  <p>If this is considered archaic, what would be the Pythonic solution for testing multiple inputs?</p>