Skip to content

Commit

Permalink
Add read the docs mock (#180)
Browse files Browse the repository at this point in the history
* Add read the docs mock

* Only mock if 'z3 in first arg to check_output
  • Loading branch information
offlinemark committed Apr 24, 2017
1 parent c2fb359 commit 8b97306
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,4 +153,19 @@
]


# -- 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

0 comments on commit 8b97306

Please sign in to comment.