@pytest.mark.skipif("sys.platform == 'win32' and sys.version_info[:2] >= (3,5)")
def test_commandline_abbrev_interp(tmpdir):
 if (sys.platform == 'win32'):
  fmt = '%s.%s'
 else:
  fmt = 'python%s.%s'
 abbrev = (fmt % (sys.version_info[0], sys.version_info[1]))
 subprocess.check_call([sys.executable, VIRTUALENV_SCRIPT, '-p', abbrev, str(tmpdir.join('venv'))])

@ pytest . mark . skipif ( "sys.platform == 'win32' and sys.version_info[:2] >= (3,5)" ) def test_commandline_abbrev_interp ( tmpdir ) : if ( sys . platform == 'win32' ) : fmt = '%s.%s' else : fmt = 'python%s.%s' abbrev = ( fmt % ( sys . version_info [ 0 ] , sys . version_info [ 1 ] ) ) subprocess . check_call ( [ sys . executable , VIRTUALENV_SCRIPT , '-p' , abbrev , str ( tmpdir . join ( 'venv' ) ) ] )
specifying abbreviated forms of the python interpreter should work .