def test_freeze_user(script, virtualenv):
 virtualenv.system_site_packages = True
 script.pip_install_local('--user', 'simple==2.0')
 script.pip_install_local('simple2==3.0')
 result = script.pip('freeze', '--user', expect_stderr=True)
 expected = textwrap.dedent('        simple==2.0\n        <BLANKLINE>')
 _check_output(result.stdout, expected)
 assert ('simple2' not in result.stdout)

def test_freeze_user ( script , virtualenv ) : virtualenv . system_site_packages = True script . pip_install_local ( '--user' , 'simple==2.0' ) script . pip_install_local ( 'simple2==3.0' ) result = script . pip ( 'freeze' , '--user' , expect_stderr = True ) expected = textwrap . dedent ( '        simple==2.0\n        <BLANKLINE>' ) _check_output ( result . stdout , expected ) assert ( 'simple2' not in result . stdout )
testing freeze with --user .