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
Nuke testing class #2364
Nuke testing class #2364
Conversation
Used to differentiate between regular REMOTE_PUBLISH and automatic tests
Necessary env vars should be configured in testing zip file
It was overwriting existing value of NUKE_PATH before
Zip files now stored on OP shared GDrive PS implementation is not working, fixed in OP-2019
Belongs to merged PR for AE testing
Task linked: OP-2019 Create test publish class for AE |
Task linked: OP-2042 nuke testing class |
All issues after review implemented. Mentioned |
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.
works
…sible For better automatic testing
@@ -100,6 +108,14 @@ def env_var(self, monkeypatch_session, download_test_data): | |||
import openpype | |||
|
|||
openpype_root = os.path.dirname(os.path.dirname(openpype.__file__)) | |||
|
|||
#reset connection to openpype DB with new env var |
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.
block comment should start with '# '
It tells Nuke where it should locate test input data
Paths in write nodes could contain python code for automatic testing. It needs to be evaluated to all os operations to work properly.
Explicitly sets directory of published files. (Purges them if exist!)
Added DBAssert class which wraps standard use cases for asserts
monkeypatch_session.setenv("NUKE_PATH", | ||
"{}{}{}".format(startup_path, | ||
os.pathsep, | ||
original_nuke_path)) |
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.
no newline at end of file
@@ -0,0 +1,45 @@ | |||
"""Classed and methods for comparing expected and published items in DBs""" | |||
|
|||
class DBAssert: |
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.
expected 2 blank lines, found 1
@pytest.fixture(scope="module") | ||
def startup_scripts(self, monkeypatch_session, download_test_data): | ||
""""Adds init scripts (like userSetup) to expected location""" | ||
raise NotImplementedError |
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.
no newline at end of file
Added bunch of updates:
|
All other features will be implemented in next PRs. |
Implemented pytest testing class for Nuke.
Pulls prepared testing zip file from GDrive, prepares temporal DBs(avalon, openpype), opens Nuke, publishes basic workfile, compares result.
(in activated {OPENPYPE_ROOT}/.venv)
{OPENPYPE_ROOT}/.venv/Scripts/python.exe {OPENPYPE_ROOT}/start.py runtests {OPENPYPE_ROOT}/tests/integration/hosts/nuke
(Contains merged PR for OP-2019- ynput/avalon-core#391)(Contains commit with current avalon-core)