Closed Daltz333 closed 3 years ago
Ooh thanks for reminding me of test cases.
For test cases: You can set environment variables with https://docs.pytest.org/en/stable/monkeypatch.html#monkeypatching-environment-variables:~:text=behavior.%22%22%22-,monkeypatch.setenv(%22USER%22%2C%20%22TestingUser%22) You can probably set html_baseurl and needed rtd vars in conf.py of each test root.
It would be nice if you could include test cases for:
Fixed the tests (kinda).
urlparse(config["html_baseurl"])
doesn't return None; It returns a parse object.
All 3 of the tests pass when run individually but don't work when run together.
It is currently not running tests, because I'm small brain. Will figure out later.
This PR implements retrieving site URL from ReadTheDocs.
This is enabled by default on RTD platforms and when site URL is not set. Users who set site URL manually will not be overridden, so this is backwards compatible.