Refactored sdp serializers
This commit is contained in:
+12
-8
@@ -1,27 +1,30 @@
|
||||
import pytest
|
||||
import os
|
||||
from os import path
|
||||
import shutil
|
||||
|
||||
from core.concept import Concept
|
||||
from core.sheerka import Sheerka
|
||||
|
||||
tests_root = path.abspath("../build/tests")
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def init_test():
|
||||
print("Before yield")
|
||||
print("Current folder " + os.getcwd())
|
||||
if not os.path.exists("build/tests"):
|
||||
os.makedirs("build/tests")
|
||||
if path.exists(tests_root):
|
||||
shutil.rmtree(tests_root)
|
||||
|
||||
if not path.exists(tests_root):
|
||||
os.makedirs(tests_root)
|
||||
current_pwd = os.getcwd()
|
||||
os.chdir("build/tests")
|
||||
os.chdir(tests_root)
|
||||
|
||||
yield None
|
||||
|
||||
os.chdir(current_pwd)
|
||||
print("After yield")
|
||||
print("Current folder " + os.getcwd())
|
||||
|
||||
|
||||
def test_root_folder_is_created_after_initialization():
|
||||
print("Before yield")
|
||||
root_folder = "init_folder"
|
||||
|
||||
return_value = Sheerka().initialize(root_folder)
|
||||
@@ -49,3 +52,4 @@ def test_null_concept_are_equals():
|
||||
|
||||
assert Sheerka.concept_equals(None, None)
|
||||
assert Sheerka.concept_equals(concept1, concept1)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user