title: Invalid syntax while testing with assert Python
body: <p>I am checking if a string starts with "4" it will classify itself as a visa card.Upon running pytest -v, returning syntax error. In my validator.py, my function looks like this:</p>
  
  <pre><code>def get_issuer(number: str) -&gt; str:
      if number.startswith('4'):
          return 'Visa'
  </code></pre>
  
  <p>And I am testing this in a seperate file :</p>
  
  <pre><code>from card_validator.validator import get_issuer
  
  def test_get_issuer_visa():
      assert get_issuer("4343 4212 1435 1231") == "Visa"
  </code></pre>
  
  <p>The error is </p>
  
  <pre><code>      def get_issuer(number: str) -&gt; str:
  E                            ^
  E   SyntaxError: invalid syntax
  </code></pre>
  
  <p>I cannot find any error. Any help on this?</p>
  
  <p>EDIT :
  The FULL output for pytest -v is </p>
  
  <pre><code>========================================================== test session starts ==========================================================
  platform linux2 -- Python 2.7.15rc1, pytest-3.3.2, py-1.5.2, pluggy-0.6.0 -- /usr/bin/python2
  cachedir: .cache
  rootdir: /home/bs-094/Dev/validator, inifile:
  collected 0 items / 1 errors                                                                                                            
  
  ================================================================ ERRORS =================================================================
  _______________________________________________ ERROR collecting tests/test_validators.py _______________________________________________
  /usr/lib/python2.7/dist-packages/_pytest/python.py:403: in _importtestmodule
      mod = self.fspath.pyimport(ensuresyspath=importmode)
  /usr/lib/python2.7/dist-packages/py/_path/local.py:668: in pyimport
      __import__(modname)
  /usr/lib/python2.7/dist-packages/_pytest/assertion/rewrite.py:213: in load_module
      py.builtin.exec_(co, mod.__dict__)
  tests/test_validators.py:1: in &lt;module&gt;
      from card_validator.validator import get_issuer
  E     File "/home/bs-094/Dev/validator/card_validator/validator.py", line 1
  E       def get_issuer(number: str) -&gt; str:
  E                            ^
  E   SyntaxError: invalid syntax
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  ======================================================== 1 error in 0.12 seconds ========================================================
  </code></pre>