#NEWLINE# @ testtools . skipUnless ( ( os . environ . get ( 'PBR_INTEGRATION' , None ) == '1' ) , 'integration tests not enabled' ) #NEWLINE# def test_pip_versions( self ) : #NEWLINE# #INDENT# pkgs = { #NEWLINE# #INDENT# 'test_markers' : { #NEWLINE# #INDENT# 'requirements.txt' : textwrap . dedent ( "                    pkg_a; python_version=='1.2'\n                    pkg_b; python_version!='1.2'\n                " ) , #NEWLINE# #UNINDENT# } , #NEWLINE# 'pkg_a' : { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , #NEWLINE# 'pkg_b' : { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# pkg_dirs = self . useFixture ( CreatePackages ( pkgs ) ) . package_dirs #NEWLINE# temp_dir = self . useFixture ( fixtures . TempDir ( ) ) . path #NEWLINE# repo_dir = os . path . join ( temp_dir , 'repo' ) #NEWLINE# venv = self . useFixture ( Venv ( 'markers' ) ) #NEWLINE# bin_python = venv . python #NEWLINE# os . mkdir ( repo_dir ) #NEWLINE# for module in self . modules : #NEWLINE# #INDENT# self . _run_cmd ( bin_python , [ '-m' , 'pip' , 'install' , '--upgrade' , module ] , cwd = venv . path , allow_fail = False ) #NEWLINE# #UNINDENT# for pkg in pkg_dirs : #NEWLINE# #INDENT# self . _run_cmd ( bin_python , [ 'setup.py' , 'sdist' , '-d' , repo_dir ] , cwd = pkg_dirs [ pkg ] , allow_fail = False ) #NEWLINE# #UNINDENT# self . _run_cmd ( bin_python , [ '-m' , 'pip' , 'install' , '--no-index' , '-f' , pkg , 'test_markers' ] , cwd = venv . path , allow_fail = False ) #NEWLINE# self . assertIn ( 'pkg-b' , self . _run_cmd ( bin_python , [ '-m' , 'pip' , 'freeze' ] , cwd = venv . path , allow_fail = False ) [ 0 ] )