We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7f65f1c commit f62b805Copy full SHA for f62b805
scripts/isolate_tests.py
@@ -106,13 +106,18 @@ def extract_and_write(f, path):
106
write_cases(f, cases)
107
108
if __name__ == '__main__':
109
+ if len(sys.argv) == 1:
110
+ print("Usage: " + sys.argv[0] + " path-to-file-or-folder-to-extract-code-from [docs]")
111
+ exit(1)
112
+
113
path = sys.argv[1]
114
docs = False
115
if len(sys.argv) > 2 and sys.argv[2] == 'docs':
116
docs = True
117
118
if isfile(path):
- extract_and_write(path, path)
119
+ _, tail = split(path)
120
+ extract_and_write(tail, path)
121
else:
122
for root, subdirs, files in os.walk(path):
123
if '_build' in subdirs:
0 commit comments