Skip to content

Commit 080f4a8

Browse files
committed
Add console output details for scripts that create files
1 parent 2d09587 commit 080f4a8

File tree

3 files changed

+43
-0
lines changed

3 files changed

+43
-0
lines changed

seleniumbase/console_scripts/sb_mkchart.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@ def main():
263263
file = codecs.open(file_path, "w+", "utf-8")
264264
file.writelines("\r\n".join(data))
265265
file.close()
266+
os.system("sbase print %s -n" % file_name)
266267
success = (
267268
"\n" + c1 + '* Chart Presentation: "' + file_name + '" was created! *'
268269
"" + cr + "\n"

seleniumbase/console_scripts/sb_mkdir.py

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,18 @@ def main():
291291
file.close()
292292

293293
if basic:
294+
data = []
295+
data.append(" %s/" % dir_name)
296+
data.append(" ├── __init__.py")
297+
data.append(" ├── pytest.ini")
298+
data.append(" ├── requirements.txt")
299+
data.append(" └── setup.cfg")
300+
file_path = "%s/%s" % (dir_name, "outline.txt")
301+
file = codecs.open(file_path, "w+", "utf-8")
302+
file.writelines("\r\n".join(data))
303+
file.close()
304+
os.system("sbase print %s -n" % file_path)
305+
os.remove(file_path)
294306
success = (
295307
"\n" + c1 + '* Directory "' + dir_name + '" was created '
296308
"with config files! *" + cr + "\n"
@@ -657,6 +669,35 @@ def main():
657669
file.writelines("\r\n".join(data))
658670
file.close()
659671

672+
data = []
673+
data.append(" %s/" % dir_name)
674+
data.append(" ├── __init__.py")
675+
data.append(" ├── my_first_test.py")
676+
data.append(" ├── parameterized_test.py")
677+
data.append(" ├── pytest.ini")
678+
data.append(" ├── requirements.txt")
679+
data.append(" ├── setup.cfg")
680+
data.append(" ├── test_demo_site.py")
681+
data.append(" └── boilerplates/")
682+
data.append(" ├── __init__.py")
683+
data.append(" ├── base_test_case.py")
684+
data.append(" ├── boilerplate_test.py")
685+
data.append(" ├── classic_obj_test.py")
686+
data.append(" ├── page_objects.py")
687+
data.append(" ├── sb_fixture_test.py")
688+
data.append(" └── samples/")
689+
data.append(" ├── __init__.py")
690+
data.append(" ├── google_objects.py")
691+
data.append(" ├── google_test.py")
692+
data.append(" ├── sb_swag_test.py")
693+
data.append(" └── swag_labs_test.py")
694+
file_path = "%s/%s" % (dir_name, "outline.txt")
695+
file = codecs.open(file_path, "w+", "utf-8")
696+
file.writelines("\r\n".join(data))
697+
file.close()
698+
os.system("sbase print %s -n" % file_path)
699+
os.remove(file_path)
700+
660701
success = (
661702
"\n" + c1 + '* Directory "' + dir_name + '" was created '
662703
"with config files and sample tests! *" + cr + "\n"

seleniumbase/console_scripts/sb_mkpres.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,7 @@ def main():
282282
file = codecs.open(file_path, "w+", "utf-8")
283283
file.writelines("\r\n".join(data))
284284
file.close()
285+
os.system("sbase print %s -n" % file_name)
285286
success = (
286287
"\n" + c1 + '* Presentation: "' + file_name + '" was created! *'
287288
"" + cr + "\n"

0 commit comments

Comments
 (0)