Skip to content

Commit 2527dd3

Browse files
committed
Add NOT_RELEASE shared_global.py boolean to toggle running tests
1 parent 6b1c299 commit 2527dd3

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Python/shared_globals.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
CONVERTER_FOLDER_NAME = "_Mod Converter"
66
WARNINGS_MOD_NAME_SEPARATOR = "-" * 50
77

8+
NOT_RELEASE = False # This enables tests when set to True, as the release version shouldn't run tests.
89

910
sg = None
1011
progress_bar = None

main.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@
77

88
from Python import tests
99
from Python.gui import gui
10+
from Python import shared_globals as cfg
1011

1112

1213
if __name__ == '__main__':
1314
try: # TODO: The VS Code Python debugger isn't able to catch exceptions due to this.
1415
gui.init_window_theme()
15-
# tests.run()
16+
if cfg.NOT_RELEASE:
17+
tests.run()
1618
gui.run_window(gui.init_window())
1719
except Exception as e:
1820
sg.popup_error("AN EXCEPTION OCCURRED!\n\nYou should make a screenshot of this and either make a GitHub issue for this by clicking the GitHub icon in this program, or you can send it to MyNameIsTrez#1585 on Discord.\n" + "_" * 60, traceback.format_exc(), title="AN EXCEPTION OCCURRED!")

0 commit comments

Comments
 (0)