Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: set optionVar value to default before running tests, small additional fixes #91

Open
wants to merge 5 commits into
base: mainline
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ omit = [
"**/__main__.py",
"**/_version.py",
"*/deadline/maya_submitter/ui/*",
"*/deadline/maya_submitter/shelf.py"
"*/deadline/maya_submitter/shelf.py",
"job_bundle_output_test_runner.py"
]


Expand Down
21 changes: 15 additions & 6 deletions src/deadline/maya_submitter/job_bundle_output_test_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def run_maya_render_submitter_job_bundle_output_test():
mainwin = _get_dcc_main_window()
count_succeeded = 0
count_failed = 0

test_job_bundle_results_file = ""
with gui_error_handler(
"Error running job bundle output test", mainwin
), _consistent_machine_settings():
Expand Down Expand Up @@ -178,11 +178,6 @@ def run_maya_render_submitter_job_bundle_output_test():
report_fh.write("\n")
if count_failed:
report_fh.write(f"Failed {count_failed} tests, succeeded {count_succeeded}.\n")
QMessageBox.warning(
mainwin,
"Some Job Bundle Tests Failed",
f"Failed {count_failed} tests, succeeded {count_succeeded}.\nSee the file {test_job_bundle_results_file} for a full report.",
)
else:
report_fh.write(f"All tests passed, ran {count_succeeded} total.\n")
QMessageBox.information(
Expand All @@ -192,6 +187,20 @@ def run_maya_render_submitter_job_bundle_output_test():
)
report_fh.write(f"Timestamp: {_timestamp_string()}\n")

# Repeat title info in body since macos does not show the window title
if count_failed:
QMessageBox.warning(
mainwin,
"Some Job Bundle Tests Failed",
f"Job Bundle Tests: Failed {count_failed}, succeeded {count_succeeded}.\nSee the file {test_job_bundle_results_file} for a full report.",
)
else:
QMessageBox.information(
mainwin,
"All Job Bundle Tests Passed",
f"Job Bundle Tests: All {count_succeeded} tests passed.",
)


def _run_job_bundle_output_test(test_dir: str, dcc_scene_file: str, report_fh, mainwin: Any):
with tempfile.TemporaryDirectory(prefix="job_bundle_output_test") as tempdir:
Expand Down