Commit 81372c58 authored by Michele's avatar Michele

polished tests

parent 69fe2769
......@@ -24,6 +24,6 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- Test classes
- Simple Examples
[unreleased]: https://gitlab.science.ru.nl/mvolpato/active-learning-nondeterministic-systems/compare/v0.1.0...HEAD
[unreleased]: https://gitlab.science.ru.nl/mvolpato/active-learning-nondeterministic-systems/compare/v0.2.0...HEAD
[v0.1.0]: https://gitlab.science.ru.nl/mvolpato/active-learning-nondeterministic-systems/compare/f7f05033cf5e002a45a67632e60b311892ca0850...v0.1.0
[v0.2.0]: https://gitlab.science.ru.nl/mvolpato/active-learning-nondeterministic-systems/compare/v0.1.0...v0.2.0
......@@ -117,22 +117,21 @@ class TestImplementations:
currentdir = os.path.dirname(os.path.abspath(
inspect.getfile(inspect.currentframe())))
parentdir = os.path.dirname(currentdir)
path = os.path.join(parentdir, "tests", "test_make_input_enabled", "g1")
path = os.path.join(parentdir, "tests", "models", "test_make_input_enabled", "g1")
gh.createDOTFile(I4, path, "pdf")
def test_create_dot_file(self):
currentdir = os.path.dirname(os.path.abspath(
inspect.getfile(inspect.currentframe())))
parentdir = os.path.dirname(currentdir)
path = os.path.join(parentdir, "tests", "test_create_dot_file", "g1")
path = os.path.join(parentdir, "tests", "models", "test_create_dot_file", "g1")
gh.createDOTFile(self.I1, path, "pdf")
print("File " + path + ".pdf must be checked by hand.")
def test_create_dot_file_chaos(self):
currentdir = os.path.dirname(os.path.abspath(
inspect.getfile(inspect.currentframe())))
parentdir = os.path.dirname(currentdir)
path = os.path.join(parentdir, "tests", "test_create_dot_file_chaos", "g1")
path = os.path.join(parentdir, "tests", "models", "test_create_dot_file_chaos", "g1")
inputs = set(['a','b'])
outputs = set(['x','y'])
......@@ -140,7 +139,6 @@ class TestImplementations:
S1 = SuspensionAutomaton(1, inputs, outputs, quiescence, True)
gh.createDOTFile(S1, path, "pdf")
print("File " + path + ".pdf must be checked by hand.")
def model_preciseness_test(self):
inputs = set(['a'])
......@@ -169,7 +167,7 @@ class TestImplementations:
currentdir = os.path.dirname(os.path.abspath(
inspect.getfile(inspect.currentframe())))
parentdir = os.path.dirname(currentdir)
path = os.path.join(parentdir, "tests", "test_model_preciseness_file", "g1")
path = os.path.join(parentdir, "tests", "models", "test_model_preciseness_file", "g1")
gh.createDOTFile(S1, path, "pdf")
# x1 = 1/4*x2 + 1/4*x1 + 0
......
......@@ -15,7 +15,7 @@ class TestLearningAlgorithm2:
def setUp(self):
logging.basicConfig(level=logging.INFO)
logging.basicConfig(level=logging.DEBUG)
logger = logging.getLogger(__name__)
inputs = set(['a','b', 'c', 'd'])
......@@ -59,7 +59,7 @@ class TestLearningAlgorithm2:
currentdir = os.path.dirname(os.path.abspath(
inspect.getfile(inspect.currentframe())))
parentdir = os.path.dirname(currentdir)
path = os.path.join(parentdir, "tests", "test_algo_2_sets")
path = os.path.join(parentdir, "tests", "models", "test_algo_2_sets")
currentdir = os.path.dirname(os.path.abspath(
inspect.getfile(inspect.currentframe())))
......@@ -75,7 +75,6 @@ class TestLearningAlgorithm2:
def creation_test(self):
Hminus, Hplus = self.L1.run()
print(bi.bisimilar(self.I1,Hplus))
assert_equal(bi.bisimilar(self.I1,Hplus), True)
def table_row_equality_test(self):
......@@ -102,7 +101,7 @@ class TestLearningAlgorithm2:
currentdir = os.path.dirname(os.path.abspath(
inspect.getfile(inspect.currentframe())))
parentdir = os.path.dirname(currentdir)
path = os.path.join(parentdir, "tests", "test_hypothesis_creation2")
path = os.path.join(parentdir, "tests", "models", "test_hypothesis_creation2")
path = os.path.join(path, "Hplus")
gh.createDOTFile(self._Hplus, path, "pdf")
......@@ -161,7 +160,7 @@ class TestLearningAlgorithm2:
currentdir = os.path.dirname(os.path.abspath(
inspect.getfile(inspect.currentframe())))
parentdir = os.path.dirname(currentdir)
path = os.path.join(parentdir, "tests", "test_consistency_check2")
path = os.path.join(parentdir, "tests", "models", "test_consistency_check2")
currentdir = os.path.dirname(os.path.abspath(
inspect.getfile(inspect.currentframe())))
......@@ -215,7 +214,7 @@ class TestLearningAlgorithm2:
currentdir = os.path.dirname(os.path.abspath(
inspect.getfile(inspect.currentframe())))
parentdir = os.path.dirname(currentdir)
path = os.path.join(parentdir, "tests", "test_reducibility_check2")
path = os.path.join(parentdir, "tests", "models", "test_reducibility_check2")
tester = RandomTester(T3, 50000, 25)
......@@ -255,7 +254,7 @@ class TestLearningAlgorithm2:
currentdir = os.path.dirname(os.path.abspath(
inspect.getfile(inspect.currentframe())))
parentdir = os.path.dirname(currentdir)
path = os.path.join(parentdir, "tests", "test_deterministic2")
path = os.path.join(parentdir, "tests", "models", "test_deterministic2")
tester = RandomTester(T3, 1000, 20)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment