lang-model/naive-nlu/tree_nlu/test.py

23 lines
467 B
Python
Raw Normal View History

2017-05-23 17:04:10 +00:00
import logging
2017-05-23 19:57:51 +00:00
from .tests import basic
2017-05-23 17:04:10 +00:00
2017-05-23 19:57:51 +00:00
logging.getLogger().setLevel(logging.WARNING)
2017-05-23 17:04:10 +00:00
2017-05-23 19:57:51 +00:00
tests = (
("basic", basic),
)
2017-05-23 17:04:10 +00:00
def main():
2017-05-23 19:57:51 +00:00
for test_name, test_module in tests:
try:
test_module.main()
print("{}".format(test_name))
except AssertionError:
print("{}".format(test_name))
except Exception as e:
print(" ! {} {}".format(test_name, e))
2017-05-23 17:04:10 +00:00
if __name__ == '__main__':
main()