#NEWLINE# @ testtools . skipUnless ( ( os . environ . get ( 'PBR_INTEGRATION' , None ) == '1' ) , 'integration tests not enabled' ) #NEWLINE# def test_install_without_pbr( self ) : #NEWLINE# #INDENT# tempdir = self . useFixture ( fixtures . TempDir ( ) ) . path #NEWLINE# dist_dir = os . path . join ( tempdir , 'distdir' ) #NEWLINE# os . mkdir ( dist_dir ) #NEWLINE# self . _run_cmd ( sys . executable , ( 'setup.py' , 'sdist' , '-d' , dist_dir ) , allow_fail = False , cwd = PBR_ROOT ) #NEWLINE# test_pkg_dir = os . path . join ( tempdir , 'testpkg' ) #NEWLINE# os . mkdir ( test_pkg_dir ) #NEWLINE# pkgs = { #NEWLINE# #INDENT# 'pkgTest' : { #NEWLINE# #INDENT# 'setup.py' : textwrap . dedent ( "                    #!/usr/bin/env python\n                    import setuptools\n                    setuptools.setup(\n                        name = 'pkgTest',\n                        tests_require = ['pkgReq'],\n                        test_suite='pkgReq'\n                    )\n                " ) , #NEWLINE# 'setup.cfg' : textwrap . dedent ( ( '                    [easy_install]\n                    find_links = %s\n                ' % dist_dir ) ) , #NEWLINE# #UNINDENT# } , #NEWLINE# 'pkgReq' : { #NEWLINE# #INDENT# 'requirements.txt' : textwrap . dedent ( '                    pbr\n                ' ) , #NEWLINE# 'pkgReq/__init__.py' : textwrap . dedent ( '                    print("FakeTest loaded and ran")\n                ' ) , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# pkg_dirs = self . useFixture ( CreatePackages ( pkgs ) ) . package_dirs #NEWLINE# test_pkg_dir = pkg_dirs [ 'pkgTest' ] #NEWLINE# req_pkg_dir = pkg_dirs [ 'pkgReq' ] #NEWLINE# self . _run_cmd ( sys . executable , ( 'setup.py' , 'sdist' , '-d' , dist_dir ) , allow_fail = False , cwd = pkgs ) #NEWLINE# venv = self . useFixture ( Venv ( 'nopbr' , [ 'pip' , 'wheel' ] ) ) #NEWLINE# python = venv . python #NEWLINE# self . useFixture ( base . CapturedSubprocess ( 'nopbr' , ( [ python ] + [ 'setup.py' , 'test' ] ) , cwd = test_pkg_dir ) )