Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions tests/test_plugin_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import os
import pkg_resources
import sys
import importlib

try:
# Python 3.3 forward includes the mock module
Expand All @@ -41,6 +40,12 @@
# Mock appears to not be installed
could_import_mock = False

try:
# Python3: use importlib.reload
from importlib import reload as import_reload
except ImportError:
# Python2:
from imp import reload as import_reload

import opentimelineio as otio
from tests import baseline_reader
Expand Down Expand Up @@ -102,7 +107,7 @@ def test_detect_plugin(self):

def test_pkg_resources_disabled(self):
os.environ["OTIO_DISABLE_PKG_RESOURCE_PLUGINS"] = "1"
importlib.reload(otio.plugins.manifest)
import_reload(otio.plugins.manifest)

# detection of the environment variable happens on import, force a
# reload to ensure that it is triggered
Expand All @@ -112,7 +117,7 @@ def test_pkg_resources_disabled(self):
# remove the environment variable and reload again for usage in the
# other tests
del os.environ["OTIO_DISABLE_PKG_RESOURCE_PLUGINS"]
importlib.reload(otio.plugins.manifest)
import_reload(otio.plugins.manifest)

def test_detect_plugin_json_manifest(self):
# Test detecting a plugin that rather than exposing the plugin_manifest
Expand Down