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: Unit test fix when DEADLINE_ENABLE_DEVELOPER_OPTIONS is True #40

Merged
merged 1 commit into from
Oct 25, 2023

Conversation

jlangmann-aws
Copy link
Contributor

What was the problem/requirement? (What/Why)

The test_initialize_and_uninitialize_plugin unit test would fail if DEADLINE_ENABLE_DEVELOPER_OPTIONS was set to True:

Error:

E           AssertionError: Expected 'registerCommand' to be called once. Called 2 times.
E           Calls: [call('DeadlineCloudSubmitter', <class 'deadline.maya_submitter.mel_commands.DeadlineCloudSubmitterCmd'>),
E            call('DeadlineCloudJobBundleOutputTests', <class 'deadline.maya_submitter.mel_commands.DeadlineCloudJobBundleOutputTestsCmd'>)].

RegisterCommad is called twice if DEADLINE_ENABLE_DEVELOPER_OPTIONS is set to True: https://github.com/casillas2/deadline-cloud-for-maya/blob/mainline/maya_submitter_plugin/plug-ins/DeadlineCloudForMaya.py#L71

What was the solution? (How)

Set DEADLINE_ENABLE_DEVELOPER_OPTIONS to False when running unit test

What is the impact of this change?

Tests pass when DEADLINE_ENABLE_DEVELOPER_OPTIONS is set to True in shell environment

How was this change tested?

Ran unit tests locally

Did you run the "Job Bundle Output Tests"? If not, why not? If so, paste the test results here.

N/A to change. Tests pass

Was this change documented?

No

Is this a breaking change?

No

@jlangmann-aws jlangmann-aws requested a review from a team as a code owner October 25, 2023 21:48
@jlangmann-aws jlangmann-aws merged commit e36eb03 into mainline Oct 25, 2023
5 checks passed
@jlangmann-aws jlangmann-aws deleted the jlangm_testFix branch October 25, 2023 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants