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

Testing: Use class methods for downloads #2431

Open
wants to merge 2 commits into
base: devel
Choose a base branch
from

Conversation

jmlapre
Copy link
Member

@jmlapre jmlapre commented Dec 18, 2024

We should be using the standard setUpClass() class method for time consuming unit test operations such as downloading a file. This currently works properly with the sst-unittest framework in serial mode but does not work in concurrent mode. Currently it skips the tests if setUpClass() hasn't been executed. I'm marking this as WIP to prevent an automerge from occurring before it gets reviewed.

for expensive operations such as downloads or initializing large
objects.
@jmlapre jmlapre added the AT: WIP Mark PR as a Work in Progress (No Autotesting Performed) label Dec 18, 2024
@jmlapre jmlapre changed the title Use class methods for downloads Testing: Use class methods for downloads Dec 18, 2024

def setUp(self):
super(type(self), self).setUp()
if self.__class__.download_file is None:
self.skipTest("File not downloaded!")
Copy link
Contributor

Choose a reason for hiding this comment

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

What happens when running the tests concurrently? setUpClass is skipped so these tests will always be skipped?

Copy link
Member Author

@jmlapre jmlapre Dec 19, 2024

Choose a reason for hiding this comment

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

Yes, that's the proposed behavior. The fix is more involved than simply calling setUpClass() where initializeClass() is called...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AT: WIP Mark PR as a Work in Progress (No Autotesting Performed)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants