framework/pddl/unit.test.py

27 lines
678 B
Python
Raw Normal View History

2023-03-05 16:58:37 +03:00
import unittest
from src.usecases.assembly_to_pddl_use_case import AssemblyToPddlUseCase
from src.model.asm4_structure import Asm4Structure
from helper.fs import FS
import os
mock = FS.readJSON(os.path.dirname(os.path.realpath(__file__)) + '/mocks/step-mock.json')
2023-03-05 16:58:37 +03:00
2023-03-05 16:58:37 +03:00
assemblyToPddl = AssemblyToPddlUseCase.call(assembly=mock,rootLabel=mock[0])
2023-03-05 16:58:37 +03:00
class TestStringMethods(unittest.TestCase):
def test_problem(self):
print(assemblyToPddl["problem"])
2023-03-05 16:58:37 +03:00
self.assertIsInstance(assemblyToPddl["problem"], str)
def test_domain(self):
self.assertIsInstance(assemblyToPddl["domain"], str)
if __name__ == '__main__':
unittest.main()