Skip to content

Commit

Permalink
Revert "FIX: Add __name__ to globals when running an example (#166)"
Browse files Browse the repository at this point in the history
This reverts commit 5771501.
  • Loading branch information
GaelVaroquaux committed Nov 16, 2016
1 parent 5771501 commit 3cdffb1
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
2 changes: 0 additions & 2 deletions sphinx_gallery/gen_rst.py
Original file line number Diff line number Diff line change
Expand Up @@ -640,8 +640,6 @@ def generate_file_rst(fname, target_dir, src_dir, gallery_conf):
# Examples may contain if __name__ == '__main__' guards
# for in example scikit-learn if the example uses multiprocessing
'__name__': '__main__',
# And they might use the __file__ parameter
'__file__': example_file,
}

# A simple example has two blocks: one for the
Expand Down
2 changes: 0 additions & 2 deletions sphinx_gallery/tests/test_gen_rst.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@
'"""',
'',
'# and now comes the module code',
'assert __name__ == "__main__"',
'assert ".py" in __file__',
'import logging',
'import sys',
'x, y = 1, 2',
Expand Down

0 comments on commit 3cdffb1

Please sign in to comment.