You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
9 lines
219 B
9 lines
219 B
import importlib
|
|
import unittest
|
|
|
|
|
|
def import_or_skip(name):
|
|
try:
|
|
return importlib.import_module(name)
|
|
except ImportError: # pragma: no cover
|
|
raise unittest.SkipTest(f'Unable to import {name}')
|
|
|