@pytest.mark.not_frozen
def test_python2():
 try:
  proc = subprocess.Popen(['python2', checkpyver.__file__, '--no-err-windows'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  (stdout, stderr) = proc.communicate()
 except FileNotFoundError:
  pytest.skip('python2 not found')
 assert (not stdout)
 stderr = stderr.decode('utf-8')
 assert re.match(TEXT, stderr), stderr
 assert (proc.returncode == 1)

@ pytest . mark . not_frozen def test_python2 ( ) : try : proc = subprocess . Popen ( [ 'python2' , checkpyver . __file__ , '--no-err-windows' ] , stdout = subprocess . PIPE , stderr = subprocess . PIPE ) ( stdout , stderr ) = proc . communicate ( ) except FileNotFoundError : pytest . skip ( 'python2 not found' ) assert ( not stdout ) stderr = stderr . decode ( 'utf-8' ) assert re . match ( TEXT , stderr ) , stderr assert ( proc . returncode == 1 )
run checkpyver with python 2 .