Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
sakia
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
clients
python
sakia
Commits
144dd4d5
Commit
144dd4d5
authored
12 years ago
by
Donald Stufft
Browse files
Options
Downloads
Patches
Plain Diff
Mock dependencies when building documentation
parent
26b16364
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/conf.py
+25
-0
25 additions, 0 deletions
docs/conf.py
with
25 additions
and
0 deletions
docs/conf.py
+
25
−
0
View file @
144dd4d5
...
...
@@ -240,3 +240,28 @@ texinfo_documents = [
# How to display URL addresses: 'footnote', 'no', or 'inline'.
#texinfo_show_urls = 'footnote'
# -- Mock Dependencies ---------------------------------------------------------
class
Mock
(
object
):
def
__init__
(
self
,
*
args
,
**
kwargs
):
pass
def
__call__
(
self
,
*
args
,
**
kwargs
):
return
Mock
()
@classmethod
def
__getattr__
(
cls
,
name
):
if
name
in
(
"
__file__
"
,
"
__path__
"
):
return
"
/dev/null
"
elif
name
[
0
]
==
name
[
0
].
upper
():
mockType
=
type
(
name
,
(),
{})
mockType
.
__module__
=
__name__
return
mockType
else
:
return
Mock
()
MOCK_MODULES
=
[
"
cffi
"
]
for
mod_name
in
MOCK_MODULES
:
sys
.
modules
[
mod_name
]
=
Mock
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment