Add read the docs mock (#180)

* Add read the docs mock

* Only mock if 'z3 in first arg to check_output
This commit is contained in:
Mark Mossberg 2017-04-24 17:06:47 -04:00 committed by GitHub
parent c2fb359b82
commit 8b973064d1

View File

@ -153,4 +153,19 @@ texinfo_documents = [
]
# -- Custom
# mock z3 existence so readthedocs will not error out when
# generating docs
import subprocess
saved_check_output = subprocess.check_output
def z3_mock_check_output(*args, **kwargs):
if args and 'z3' in args[0]:
return 'Z3 Version 4.4.2'
return saved_check_output(*args, **kwargs)
subprocess.check_output = z3_mock_check_output