PR#4307: choose correct import machinery in unit test
Merges #4307 https://pagure.io/koji/pull-request/4307 Fixes: #4306 https://pagure.io/koji/issue/4306 failures in tests/test_lib/test_plugin.py
This commit is contained in:
commit
fb2bbaf229
1 changed files with 4 additions and 7 deletions
|
|
@ -9,17 +9,14 @@ from six.moves import range
|
|||
import sys
|
||||
import unittest
|
||||
|
||||
try:
|
||||
import imp
|
||||
importlib = None
|
||||
except ImportError:
|
||||
import importlib
|
||||
imp = None
|
||||
|
||||
import koji
|
||||
import koji.util
|
||||
import koji.plugin
|
||||
|
||||
# check which import machinery the lib is using
|
||||
imp = getattr(koji.plugin, 'imp', None)
|
||||
importlib = koji.plugin.importlib
|
||||
|
||||
|
||||
class TestCallbackDecorators(unittest.TestCase):
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue