Last active
February 10, 2016 15:26
-
-
Save megies/ccfb499eafdef14c22e1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
import warnings | |
from importlib import import_module | |
warnings.simplefilter("ignore") | |
# print sys.argv[1:] | |
# for is_module, object_name, _, module_name in sys.argv[1:]: | |
is_module, object_name, _, module_name = sys.argv[1].split(",") | |
# is_module = is_module == "module:" | |
try: | |
getattr(import_module(module_name), object_name) | |
except Exception as e: | |
print("FAIL: {} from {} ({})".format(object_name, module_name, str(e))) | |
else: | |
print("OK: {} from {}".format(object_name, module_name)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment