Skip to content

Instantly share code, notes, and snippets.

@rnrbarbosa
Created April 29, 2019 19:53
Show Gist options
  • Save rnrbarbosa/d3e9e3ff74df8bbf44d32b78f4182dea to your computer and use it in GitHub Desktop.
Save rnrbarbosa/d3e9e3ff74df8bbf44d32b78f4182dea to your computer and use it in GitHub Desktop.
pytest parameterized
import pytest
import requests
domains = ['cnn.com','google.com']
@pytest.mark.parametrize("domain",domains)
def test_domains(domain):
url = "https://" + domain
r = requests.get(url)
assert r.status_code == 200
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment