from tests.lib import run_pip, reset_env


def test_timeout():
    reset_env()
    result = run_pip("--timeout", "0.01", "install", "-vvv", "INITools",
        expect_error=True,
    )
    assert "Could not fetch URL https://pypi.python.org/simple/INITools/: timed out" in result.stdout
    assert "Could not fetch URL https://pypi.python.org/simple/: timed out" in result.stdout

def test_timeout(script):
    result = script.pip("--timeout", "0.01", "install", "-vvv", "INITools",
        expect_error=True,
    )
    assert "Could not fetch URL https://pypi.python.org/simple/INITools/: timed out" in result.stdout
    assert "Could not fetch URL https://pypi.python.org/simple/: timed out" in result.stdout

Update requests test for the new funcargs
Update requests test for the new funcargs

- from tests.lib import run_pip, reset_env
- 
- 
- def test_timeout():
+ def test_timeout(script):
-     reset_env()
-     result = run_pip("--timeout", "0.01", "install", "-vvv", "INITools",
+     result = script.pip("--timeout", "0.01", "install", "-vvv", "INITools",
          expect_error=True,
      )
      assert "Could not fetch URL https://pypi.python.org/simple/INITools/: timed out" in result.stdout
      assert "Could not fetch URL https://pypi.python.org/simple/: timed out" in result.stdout
  
Update requests test for the new funcargs
## Code Before:
from tests.lib import run_pip, reset_env


def test_timeout():
    reset_env()
    result = run_pip("--timeout", "0.01", "install", "-vvv", "INITools",
        expect_error=True,
    )
    assert "Could not fetch URL https://pypi.python.org/simple/INITools/: timed out" in result.stdout
    assert "Could not fetch URL https://pypi.python.org/simple/: timed out" in result.stdout

## Instruction:
Update requests test for the new funcargs
## Code After:
def test_timeout(script):
    result = script.pip("--timeout", "0.01", "install", "-vvv", "INITools",
        expect_error=True,
    )
    assert "Could not fetch URL https://pypi.python.org/simple/INITools/: timed out" in result.stdout
    assert "Could not fetch URL https://pypi.python.org/simple/: timed out" in result.stdout
