Implemented dictionnary based file system to speed up the tests

This commit is contained in:
2019-11-21 21:54:39 +01:00
parent 714f4f5dd0
commit 5d37addc7d
17 changed files with 817 additions and 494 deletions
+1 -25
View File
@@ -1,31 +1,7 @@
import shutil
from os import path
import os
import pytest
from core.builtin_concepts import ReturnValueConcept, BuiltinConcepts
from core.sheerka import Sheerka, ExecutionContext
import core.builtin_helpers
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 test_i_can_use_expect_one_when_empty():
sheerka = get_sheerka()
@@ -136,7 +112,7 @@ def test_i_can_use_expect_one_when_not_a_list_false():
def get_sheerka():
sheerka = Sheerka()
sheerka.initialize(root_folder)
sheerka.initialize("mem://")
return sheerka