Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tests/python/rst_to_doctree_mini.py')
-rw-r--r--tests/python/rst_to_doctree_mini.py21
1 files changed, 13 insertions, 8 deletions
diff --git a/tests/python/rst_to_doctree_mini.py b/tests/python/rst_to_doctree_mini.py
index 6a885a108f8..dfc6cd57db6 100644
--- a/tests/python/rst_to_doctree_mini.py
+++ b/tests/python/rst_to_doctree_mini.py
@@ -28,13 +28,14 @@
import collections
-Directive = collections.namedtuple('Directive',
- ("type",
- "value",
- "value_strip",
- "line",
- "indent",
- "members"))
+Directive = collections.namedtuple(
+ "Directive",
+ ("type",
+ "value",
+ "value_strip",
+ "line",
+ "indent",
+ "members"))
def parse_rst_py(filepath):
@@ -80,7 +81,7 @@ def parse_rst_py(filepath):
return tree[0]
-if __name__ == "__main__":
+def main():
# not intended use, but may as well print rst files passed as a test.
import sys
for arg in sys.argv:
@@ -88,3 +89,7 @@ if __name__ == "__main__":
items = parse_rst_py(arg)
for i in items:
print(i)
+
+
+if __name__ == "__main__":
+ main()