Skip to content

Commit

Permalink
Add environment variable to skip doc tes (#944)
Browse files Browse the repository at this point in the history
* Add environment variable to skip doc tes
* Add to documentation about env variables

Co-authored-by: ssteinbach <ssteinbach@users.noreply.github.com>
  • Loading branch information
ssteinbach and ssteinbach committed Apr 19, 2021
1 parent d51bbc1 commit 7de011d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/tutorials/otio-env-variables.md
Expand Up @@ -16,3 +16,4 @@ These variables must be set _before_ the OpenTimelineIO python library is import
These variables only impact unit tests.

- `OTIO_DISABLE_SHELLOUT_TESTS`: When running the unit tests, skip the console tests that run the otiocat program and check output through the shell. This is desirable in environments where running the commandline tests is not meaningful or problematic. Does not disable the tests that run through python calling mechanisms.
- `OTIO_DISABLE_SERIALIZED_SCHEMA_TEST`: Skip the unit tests that generate documentation and compare the current state of the schema against the stored one. Useful if the documentation is not available from the test directory.
14 changes: 14 additions & 0 deletions tests/test_serialized_schema.py
Expand Up @@ -31,6 +31,11 @@
)


@unittest.skipIf(
os.environ.get("OTIO_DISABLE_SERIALIZED_SCHEMA_TEST"),
"Serialized schema test disabled because "
"$OTIO_DISABLE_SERIALIZED_SCHEMA_TEST is set to something other than ''"
)
class SerializedSchemaTester(unittest.TestCase):
def test_serialized_schema(self):
"""Test if the schema has changed since last time the serialized schema
Expand All @@ -54,6 +59,11 @@ def test_serialized_schema(self):
)


@unittest.skipIf(
os.environ.get("OTIO_DISABLE_SERIALIZED_SCHEMA_TEST"),
"Serialized schema test disabled because "
"$OTIO_DISABLE_SERIALIZED_SCHEMA_TEST is set to something other than ''"
)
class PluginDocumentationTester(unittest.TestCase):
def test_plugin_documentation(self):
"""Verify that the plugin manifest matches what is checked into the
Expand All @@ -78,3 +88,7 @@ def test_plugin_documentation(self):
"\n The schema has changed and the autogenerated documentation in {}"
" needs to be updated. run: `make doc-plugins-update`".format(fp)
)


if __name__ == '__main__':
unittest.main()

0 comments on commit 7de011d

Please sign in to comment.