-
Notifications
You must be signed in to change notification settings - Fork 3
TST: add render testing, mark as xslow #39
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
Changes from all commits
3fc3294
9fa354c
f724383
a01013c
ed215ce
fffe15c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,7 +27,8 @@ def _clean_up(ggmv): | |
| ggmv._session.remove(artist.trajectory.uuid) | ||
| except Exception: | ||
| pass | ||
| bpy.ops.wm.open_mainfile(filepath=bpy.data.filepath) | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was added based on the discussion at gh-41, and seems to help isolate (from cross-test pollution) the scenes used in render tests locally. It is slightly different than the approach Brady uses upstream at https://github.com/BradyAJohnston/MolecularNodes/blob/main/tests/conftest.py#L16 with One problem with this change is that, at least in local testing, this seems to reduce "thread safety" with
Details``` =============================================================================================================================== ERRORS =============================================================================================================================== __________________________________________________________________________________________________________________ ERROR collecting ggmolvis/tests ___________________________________________________________________________________________________________________ ../spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/python-3.11.7-g6qcoukv4k4emoygj4zxqsig2zqs3wlj/lib/python3.11/importlib/__init__.py:126: in import_module return _bootstrap._gcd_import(name[level:], package, level) :1204: in _gcd_import ??? :1176: in _find_and_load ??? :1126: in _find_and_load_unlocked ??? :241: in _call_with_frames_removed ??? :1204: in _gcd_import ??? :1176: in _find_and_load ??? :1126: in _find_and_load_unlocked ??? :241: in _call_with_frames_removed ??? :1204: in _gcd_import ??? :1176: in _find_and_load ??? :1147: in _find_and_load_unlocked ??? :690: in _load_unlocked ??? :940: in exec_module ??? :241: in _call_with_frames_removed ??? ggmolvis/__init__.py:55: in bpy.ops.wm.open_mainfile(filepath=dest_path) ../../python_venvs/py_311_mda_dev/lib/python3.11/site-packages/bpy/4.4/scripts/modules/bpy/ops.py:109: in __call__ ret = _op_call(self.idname_py(), kw) E RuntimeError: Error: File format is not supported in file "/var/folders/5_/hm0ft57n6dn2ksgg2p0bx5h0000w2g/T/ggmolvis.blend" ```Spot checking the That said, I'm not sure where we stand on the tradeoffs here if this reduces thread safety. Maybe we could use a lock/mutex somehow, or even just suggest avoiding |
||
| ggmv._session.prune() | ||
| ggmv._session._ggmolvis = set() | ||
| ggmv._initialized = False | ||
| ggmv = GGMolVis() | ||
| ggmv = GGMolVis() | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| [pytest] | ||
|
|
||
| markers = | ||
| xslow: mark test as extremely slow (not run unless explicitly requested) |
Uh oh!
There was an error while loading. Please reload this page.
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.
Based on our last call I was under the impression that neither
ggmolvisnorMolecularNodesdidrendertesting in GHA CI, but after investigating on my fork (tylerjereddy#1), it became clear thatggmolvishas a small number ofrendertests. They don't use composition, and no assertions are made about the correctness of their results, so they basically just sniff test that there is no crash.From the durations output over there:
In that case I temporarily disabled the composition in my new test here so that it would run (i.e., temporarily turned off
composite_bg_rgba).If I check the durations locally on this branch via
GGMOLVIS_XSLOW=1 python -m pytest -n 8 --durations=10Also, unrelated, but looks like the exit segfault is indeed gone locally now with
bpy4.4.0released 3 days ago.