diff options
author | ankitjavalkar | 2015-10-08 15:56:13 +0530 |
---|---|---|
committer | ankitjavalkar | 2015-10-09 12:49:32 +0530 |
commit | b0c8ffb1d419e01392de82134c86687f49306f20 (patch) | |
tree | 063b560e3ae19cc2d8dcac05a7a122749fc4cf69 /yaksh/tests/test_code_evaluation.py | |
parent | 38812e177e27c4229e68a6f40394e90a5ee76efd (diff) | |
download | online_test-b0c8ffb1d419e01392de82134c86687f49306f20.tar.gz online_test-b0c8ffb1d419e01392de82134c86687f49306f20.tar.bz2 online_test-b0c8ffb1d419e01392de82134c86687f49306f20.zip |
Add missing evaluator tests
Diffstat (limited to 'yaksh/tests/test_code_evaluation.py')
-rw-r--r-- | yaksh/tests/test_code_evaluation.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/yaksh/tests/test_code_evaluation.py b/yaksh/tests/test_code_evaluation.py new file mode 100644 index 0000000..84701fb --- /dev/null +++ b/yaksh/tests/test_code_evaluation.py @@ -0,0 +1,24 @@ +import unittest +import os +from yaksh import python_code_evaluator +from yaksh.language_registry import _LanguageRegistry, set_registry, get_registry +from yaksh.settings import SERVER_TIMEOUT + + +class RegistryTestCase(unittest.TestCase): + def setUp(self): + set_registry() + self.registry_object = get_registry() + self.language_registry = _LanguageRegistry() + + def test_set_register(self): + class_name = getattr(python_code_evaluator, 'PythonCodeEvaluator') + self.registry_object.register("python", "yaksh.python_code_evaluator.PythonCodeEvaluator") + self.assertEquals(self.registry_object.get_class("python"), class_name) + + def tearDown(self): + self.registry_object = None + + +if __name__ == '__main__': + unittest.main() |