Fixed unit test
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
def concept one as 1
|
||||
def concept two as 2
|
||||
def concept three as 3
|
||||
def concept four as 4
|
||||
def concept five as 5
|
||||
def concept one as 1
|
||||
def concept two as 2
|
||||
def concept three as 3
|
||||
def concept four as 4
|
||||
def concept five as 5
|
||||
def concept one as 1
|
||||
def concept two as 2
|
||||
def concept three as 3
|
||||
def concept four as 4
|
||||
def concept five as 5
|
||||
@@ -0,0 +1,10 @@
|
||||
def concept one as 1
|
||||
def concept two as 2
|
||||
def concept three as 3
|
||||
def concept four as 4
|
||||
def concept five as 5
|
||||
def concept one as 1
|
||||
def concept two as 2
|
||||
def concept three as 3
|
||||
def concept four as 4
|
||||
def concept five as 5
|
||||
@@ -18,7 +18,7 @@ class TestSheerkaHistoryManager(TestUsingMemoryBasedSheerka):
|
||||
sheerka.evaluate_user_input("def concept five as 5")
|
||||
sheerka.evaluate_user_input("five")
|
||||
|
||||
h = list(sheerka.history(-1)) # all
|
||||
h = list(sheerka.history(-1)) # all
|
||||
assert h == [
|
||||
hist("five", True),
|
||||
hist("def concept five as 5", True),
|
||||
@@ -35,18 +35,12 @@ class TestSheerkaHistoryManager(TestUsingMemoryBasedSheerka):
|
||||
|
||||
h = list(sheerka.history(2))
|
||||
assert h == [
|
||||
hist("two", True),
|
||||
hist("def concept two as 2", True)
|
||||
hist("five", True),
|
||||
hist("def concept five as 5", True)
|
||||
]
|
||||
|
||||
h = list(sheerka.history(2, 2))
|
||||
assert h == [
|
||||
hist("xxx", False),
|
||||
hist("one", True),
|
||||
]
|
||||
|
||||
h = list(sheerka.history(-1))
|
||||
assert h == [
|
||||
hist("xxx", False),
|
||||
hist("one", True),
|
||||
hist("four", True),
|
||||
hist("def concept four as 4", True),
|
||||
]
|
||||
|
||||
@@ -112,7 +112,7 @@ class TestSheerkaSetsManager(TestUsingFileBasedSheerka):
|
||||
|
||||
group = Concept("group").init_key()
|
||||
group.metadata.id = "1001"
|
||||
assert not sheerka.isagroup(group)
|
||||
assert not sheerka.isaset(group)
|
||||
|
||||
foo = Concept("foo").init_key()
|
||||
foo.metadata.id = "1002"
|
||||
@@ -120,5 +120,5 @@ class TestSheerkaSetsManager(TestUsingFileBasedSheerka):
|
||||
|
||||
context = self.get_context(sheerka)
|
||||
sheerka.add_concept_to_set(context, foo, group)
|
||||
assert sheerka.isagroup(group)
|
||||
assert sheerka.isaset(group)
|
||||
assert sheerka.isa(foo, group)
|
||||
|
||||
Reference in New Issue
Block a user