I’m getting “Module not found” errors for my Travis CI build:
import requests
url_ddg = "https://api.duckduckgo.com"
def test_ddg0():
resp = requests.get(url_ddg + "/?q=DuckDuckGo&format=json")
rsp_data = resp.json()
assert "DuckDuckGo" in rsp_data["Heading"]
My travis.yml file contains this following code:
language: python
python:
- "3.8.2"
- "nightly"
install:
- "pip install pytest"
- "pip install -r requirements.txt"
script: python -m pytest Test.py
My requirements.txt file contains this:
pytest==4.6