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 tests to write output in testing temp dir (not source tree). #3127

Merged
merged 1 commit into from
May 31, 2023

Conversation

seando-adsk
Copy link
Collaborator

No description provided.

@seando-adsk seando-adsk added the unit test Related to unit tests (both python or c++) label May 29, 2023
@seando-adsk seando-adsk requested a review from csyshing May 29, 2023 20:08
@@ -48,8 +48,7 @@ def tearDownClass(cls):

def setUp(self):
unittest.TestCase.setUp(self)
self.workingDir = os.path.abspath(type(self).__name__)
os.mkdir(self.workingDir)
self.workingDir = os.environ.get('MAYA_APP_DIR')
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't write temporary testing files to the source tree. Instead use the MAYA_APP_DIR which is a different temp folder created for each unit test.

Copy link
Collaborator

@csyshing csyshing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks!

@seando-adsk
Copy link
Collaborator Author

Preflight failure was random image diff in test testVP2RenderDelegateDisplayLayers which I didn't touch. I modified two other unit tests (no code changes).

@seando-adsk seando-adsk added the ready-for-merge Development process is finished, PR is ready for merge label May 31, 2023
@seando-adsk seando-adsk merged commit e10df1a into dev May 31, 2023
@seando-adsk seando-adsk deleted the donnels/tests_should_write_to_temp branch May 31, 2023 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-merge Development process is finished, PR is ready for merge unit test Related to unit tests (both python or c++)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants