Implemented dictionnary based file system to speed up the tests
This commit is contained in:
+1
-24
@@ -1,8 +1,3 @@
|
||||
import os
|
||||
import shutil
|
||||
from os import path
|
||||
|
||||
import pytest
|
||||
import ast
|
||||
|
||||
from core.ast.nodes import NodeParent, GenericNodeConcept
|
||||
@@ -11,28 +6,10 @@ from core.ast.visitors import ConceptNodeVisitor, UnreferencedNamesVisitor
|
||||
from core.builtin_concepts import BuiltinConcepts
|
||||
from core.sheerka import Sheerka
|
||||
|
||||
tests_root = path.abspath("../build/tests")
|
||||
root_folder = "init_folder"
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def init_test():
|
||||
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(tests_root)
|
||||
|
||||
yield None
|
||||
|
||||
os.chdir(current_pwd)
|
||||
|
||||
|
||||
def get_sheerka():
|
||||
sheerka = Sheerka()
|
||||
sheerka.initialize(root_folder)
|
||||
sheerka.initialize("mem://")
|
||||
|
||||
return sheerka
|
||||
|
||||
|
||||
Reference in New Issue
Block a user