-
-
Notifications
You must be signed in to change notification settings - Fork 98
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
Assets 2: Chained assets #436
Conversation
With all the possible threading problems, it was just simpler
Using the executor instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is good, I just would like some comments in the tests to make it clear what's even being tested and what it's trying to prove.
|
||
|
||
def test_chained(clean_assets): | ||
class Const(BackgroundMixin, AbstractAsset): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is kind of magical, can we get a comment that this is essentially a threaded string.join so folks at least get the intent?
with engine: | ||
engine.start() | ||
|
||
assert a.load(timeout=5) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what this is intended to test? Just that all of these workers are loaded in less than 5 seconds?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's so that if the chaining deadlocks, the test fails instead of pytest just sitting.
(Yes, this happened quite a bit in development.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bors r+
Depends on #432
Implements chained assets: Assets that depend on other assets (such as how Text depends on Fonts)
Closes #373