Fixed #20: I can parse simple concepts
This commit is contained in:
+8
-1
@@ -1,8 +1,12 @@
|
||||
import inspect
|
||||
|
||||
import pytest
|
||||
|
||||
from helpers import GetNextId
|
||||
from server.authentication import User
|
||||
|
||||
DEFAULT_ONTOLOGY_NAME = "current_test_"
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def sheerka():
|
||||
@@ -75,12 +79,15 @@ class NewOntology:
|
||||
"""
|
||||
from core.ExecutionContext import ExecutionContext
|
||||
|
||||
def __init__(self, context: ExecutionContext, name="current_test"):
|
||||
def __init__(self, context: ExecutionContext, name=None):
|
||||
self.sheerka = context.sheerka
|
||||
self.context = context
|
||||
self.name = name
|
||||
self.ontology = None
|
||||
|
||||
if self.name is None:
|
||||
self.name = inspect.stack()[1][3]
|
||||
|
||||
def __enter__(self):
|
||||
self.ontology = self.sheerka.om.push_ontology(self.name)
|
||||
return self.ontology
|
||||
|
||||
Reference in New Issue
Block a user