Some query class / unit tests fixes and enhancements #4163
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
My ambitious PRs tend to sit for months on end with no review, often becoming so divergent from the target branch that the conflicts are unresolvable. As a result, I'm trying to submit more, smaller PRs. This is one, containing a first round of tweaks to the project-data query classes and their associated unit tests.
filter(intersect=)
Also, make the test data slightly more interesting by varying
Position
values for the clips/transitions in the test data.app.project
By calling
get_app()
each time we need to access the project data, we delay the lookup until it's needed. As a result, query classes can now be imported even if an application instance has not yet been initialized. (As long as it's initialized before the first call to a query class method).(There's no longer any need to delay the imports.)
TestQueryClass
class toQueryTests
, which is more in line with typicalunittest
namingTestQueryClass
references in the class code withcls
orself
as appropriate, so any future renaming will be far less of a pain