Added first version of DebugManager. Implemented draft of the rule engine

This commit is contained in:
2020-11-20 13:41:45 +01:00
parent cd066881b4
commit 315f8ea09b
156 changed files with 8388 additions and 2852 deletions
+40 -46
View File
@@ -353,25 +353,21 @@ second : 'value d'
sheerka.print(lst)
captured = capsys.readouterr()
assert captured.out == """(1001)foo a b
a : 'value a'
var.a: *name 'var' is not defined*
b : 'value b'
var.b: *name 'var' is not defined*
id : '1001'
name : 'foo a b'
key : 'foo __var__0 __var__1'
body : __NOT_INITIALIZED
self : (1001)foo a b
a : 'value a'
b : 'value b'
id : '1001'
name: 'foo a b'
key : 'foo __var__0 __var__1'
body: **NotInit**
self: (1001)foo a b
(1001)foo a b
a : 'value c'
var.a: *name 'var' is not defined*
b : 'value d'
var.b: *name 'var' is not defined*
id : '1001'
name : 'foo a b'
key : 'foo __var__0 __var__1'
body : __NOT_INITIALIZED
self : (1001)foo a b
a : 'value c'
b : 'value d'
id : '1001'
name: 'foo a b'
key : 'foo __var__0 __var__1'
body: **NotInit**
self: (1001)foo a b
"""
def test_i_can_format_d_when_dictionary(self, capsys):
@@ -391,34 +387,32 @@ self : (1001)foo a b
sheerka.print(lst)
captured = capsys.readouterr()
assert captured.out == """(1001)foo a b
a : 'value a'
var.a: *name 'var' is not defined*
b : {'a' : 'value a'
'beta' : {'b1': 10
'b2': Obj(a='10', b=15)
'b3': ['items',
'in',
'a',
'list']}
'gamma' : {'list' : ["'quoted string'",
""double" 'single'",
'c3']
'empty': []}
'epsilon': ['a',
'b',
'c']
'g' : {'tuple': ('tuple-a',
'tuple-b',
'tuple-b')
'empty': ()}
'h' : {'set' : {'set-a'}
'empty': {}}}
var.b: *name 'var' is not defined*
id : '1001'
name : 'foo a b'
key : 'foo __var__0 __var__1'
body : __NOT_INITIALIZED
self : (1001)foo a b
a : 'value a'
b : {'a' : 'value a'
'beta' : {'b1': 10
'b2': Obj(a='10', b=15)
'b3': ['items',
'in',
'a',
'list']}
'gamma' : {'list' : ["'quoted string'",
""double" 'single'",
'c3']
'empty': []}
'epsilon': ['a',
'b',
'c']
'g' : {'tuple': ('tuple-a',
'tuple-b',
'tuple-b')
'empty': ()}
'h' : {'set' : {'set-a'}
'empty': {}}}
id : '1001'
name: 'foo a b'
key : 'foo __var__0 __var__1'
body: **NotInit**
self: (1001)foo a b
"""
def test_i_can_manage_when_property_does_not_exist(self, capsys):