jaclang 0.7.16__py3-none-any.whl → 0.7.18__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of jaclang might be problematic. Click here for more details.

Files changed (81) hide show
  1. jaclang/cli/cli.py +140 -77
  2. jaclang/compiler/absyntree.py +9 -4
  3. jaclang/compiler/constant.py +8 -8
  4. jaclang/compiler/parser.py +10 -2
  5. jaclang/compiler/passes/main/__init__.py +1 -1
  6. jaclang/compiler/passes/main/access_modifier_pass.py +96 -147
  7. jaclang/compiler/passes/main/fuse_typeinfo_pass.py +152 -50
  8. jaclang/compiler/passes/main/import_pass.py +88 -59
  9. jaclang/compiler/passes/main/py_collect_dep_pass.py +70 -0
  10. jaclang/compiler/passes/main/pyast_gen_pass.py +46 -6
  11. jaclang/compiler/passes/main/pyast_load_pass.py +1 -0
  12. jaclang/compiler/passes/main/pyjac_ast_link_pass.py +7 -0
  13. jaclang/compiler/passes/main/schedules.py +9 -2
  14. jaclang/compiler/passes/main/sym_tab_build_pass.py +9 -5
  15. jaclang/compiler/passes/main/tests/fixtures/autoimpl.empty.impl.jac +0 -0
  16. jaclang/compiler/passes/main/tests/fixtures/autoimpl.jac +1 -1
  17. jaclang/compiler/passes/main/tests/fixtures/py_imp_test.jac +29 -0
  18. jaclang/compiler/passes/main/tests/fixtures/pygame_mock/__init__.py +3 -0
  19. jaclang/compiler/passes/main/tests/fixtures/pygame_mock/color.py +3 -0
  20. jaclang/compiler/passes/main/tests/fixtures/pygame_mock/constants.py +5 -0
  21. jaclang/compiler/passes/main/tests/fixtures/pygame_mock/display.py +2 -0
  22. jaclang/compiler/passes/main/tests/test_import_pass.py +72 -13
  23. jaclang/compiler/passes/main/type_check_pass.py +15 -5
  24. jaclang/compiler/passes/tool/jac_formatter_pass.py +13 -3
  25. jaclang/compiler/passes/tool/tests/fixtures/corelib.jac +37 -41
  26. jaclang/compiler/passes/tool/tests/fixtures/corelib_fmt.jac +37 -41
  27. jaclang/compiler/passes/tool/tests/fixtures/general_format_checks/access_mod_check.jac +27 -0
  28. jaclang/compiler/passes/utils/mypy_ast_build.py +45 -0
  29. jaclang/compiler/symtable.py +16 -11
  30. jaclang/compiler/tests/test_importer.py +17 -9
  31. jaclang/langserve/engine.py +64 -16
  32. jaclang/langserve/server.py +16 -1
  33. jaclang/langserve/tests/fixtures/import_include_statements.jac +3 -3
  34. jaclang/langserve/tests/fixtures/rename.jac +30 -0
  35. jaclang/langserve/tests/test_server.py +224 -6
  36. jaclang/langserve/utils.py +28 -98
  37. jaclang/plugin/builtin.py +8 -4
  38. jaclang/plugin/default.py +86 -64
  39. jaclang/plugin/feature.py +13 -13
  40. jaclang/plugin/spec.py +10 -11
  41. jaclang/plugin/tests/fixtures/other_root_access.jac +82 -0
  42. jaclang/plugin/tests/test_jaseci.py +414 -42
  43. jaclang/runtimelib/architype.py +481 -333
  44. jaclang/runtimelib/constructs.py +5 -8
  45. jaclang/runtimelib/context.py +89 -69
  46. jaclang/runtimelib/importer.py +16 -15
  47. jaclang/runtimelib/machine.py +66 -2
  48. jaclang/runtimelib/memory.py +134 -75
  49. jaclang/runtimelib/utils.py +17 -10
  50. jaclang/settings.py +2 -4
  51. jaclang/tests/fixtures/access_checker.jac +12 -17
  52. jaclang/tests/fixtures/access_modifier.jac +88 -33
  53. jaclang/tests/fixtures/baddy.jac +3 -0
  54. jaclang/tests/fixtures/bar.jac +34 -0
  55. jaclang/tests/fixtures/builtin_dotgen.jac +1 -0
  56. jaclang/tests/fixtures/edge_node_walk.jac +1 -1
  57. jaclang/tests/fixtures/edge_ops.jac +1 -1
  58. jaclang/tests/fixtures/edges_walk.jac +1 -1
  59. jaclang/tests/fixtures/foo.jac +43 -0
  60. jaclang/tests/fixtures/game1.jac +1 -1
  61. jaclang/tests/fixtures/gendot_bubble_sort.jac +1 -1
  62. jaclang/tests/fixtures/import.jac +9 -0
  63. jaclang/tests/fixtures/index_slice.jac +30 -0
  64. jaclang/tests/fixtures/objref.jac +12 -0
  65. jaclang/tests/fixtures/pyfunc_1.py +1 -1
  66. jaclang/tests/fixtures/pyfunc_2.py +2 -2
  67. jaclang/tests/fixtures/pygame_mock/__init__.py +3 -0
  68. jaclang/tests/fixtures/pygame_mock/color.py +3 -0
  69. jaclang/tests/fixtures/pygame_mock/constants.py +5 -0
  70. jaclang/tests/fixtures/pygame_mock/display.py +2 -0
  71. jaclang/tests/fixtures/pygame_mock/inner/__init__.py +0 -0
  72. jaclang/tests/fixtures/pygame_mock/inner/iner_mod.py +2 -0
  73. jaclang/tests/test_cli.py +49 -6
  74. jaclang/tests/test_language.py +126 -80
  75. jaclang/tests/test_reference.py +2 -9
  76. jaclang/utils/treeprinter.py +30 -3
  77. {jaclang-0.7.16.dist-info → jaclang-0.7.18.dist-info}/METADATA +3 -1
  78. {jaclang-0.7.16.dist-info → jaclang-0.7.18.dist-info}/RECORD +81 -59
  79. /jaclang/tests/fixtures/{err.test.jac → baddy.test.jac} +0 -0
  80. {jaclang-0.7.16.dist-info → jaclang-0.7.18.dist-info}/WHEEL +0 -0
  81. {jaclang-0.7.16.dist-info → jaclang-0.7.18.dist-info}/entry_points.txt +0 -0
jaclang/settings.py CHANGED
@@ -14,10 +14,8 @@ class Settings:
14
14
  filter_sym_builtins: bool = True
15
15
  ast_symbol_info_detailed: bool = False
16
16
  pass_timer: bool = False
17
-
18
- # Import configuration
19
- py_raise: bool = False
20
- py_raise_deep: bool = False
17
+ collect_py_dep_debug: bool = False
18
+ print_py_raised_ast: bool = False
21
19
 
22
20
  # Formatter configuration
23
21
  max_line_length: int = 88
@@ -1,19 +1,14 @@
1
- obj :priv BankAccount {
2
- has account_no: int;
3
- can register() {
4
- print(f"{self.account_no} has been registered.");
5
- }
6
- }
7
- can :priv privmethod() {
8
- return "private method";
9
- }
10
- can :priv overide_check() {
11
- return "inside access_check";
12
- }
13
- glob :priv b=1;
14
- glob :priv p=0;
1
+
2
+ obj :pub ModulePublObj {}
3
+ obj :priv ModulePrivObj {}
4
+
5
+ glob :pub module_publ_glob:int = 0;
6
+ glob :priv module_priv_glob:int = 0;
7
+
15
8
  with entry {
16
- public = BankAccount(123);
17
- public.register();
18
- privmethod();
9
+ ModulePrivObj(); # <-- okey.
10
+ ModulePublObj(); # <-- okey.
11
+
12
+ module_publ_glob; # <-- okey.
13
+ module_priv_glob; # <-- okey.
19
14
  }
@@ -1,49 +1,104 @@
1
1
  include:jac access_checker;
2
- obj Animal {
3
- has :pub species: str;
4
2
 
5
- can :priv introduce() {
6
- return "Hello, I am " + self.species + ". ";
7
- }
3
+ obj SomeObj {
4
+ obj :pub InnerPublObj {}
5
+ obj :priv InnerPrivObj {}
6
+ obj :protect InnerProtObj {}
7
+
8
+ enum :pub InnerPublEnum { FOO = "FOO" }
9
+ enum :priv InnerPrivEnum { BAR = "BAR" }
10
+ enum :protect InnerProtEnum { BAZ = "BAZ" }
8
11
 
12
+ can :pub publ_ability() -> None {}
13
+ can :priv priv_ability() -> None {}
14
+ can :protect prot_ability() -> None {}
9
15
 
16
+ has :pub publ_attrib:int = 0;
17
+ has :priv priv_attrib:int = 0;
18
+ has :protect prot_attrib:int = 0;
10
19
  }
11
20
 
12
- obj Dog: Animal: {
13
- has :pub breed: str;
14
21
 
15
- can init(breed: str) {
16
- super.init("Dog");
17
- self.breed = breed;
18
- }
22
+ obj BaseClass {
23
+ has :pub publ_attrib:int = 0;
24
+ has :priv priv_attrib:int = 0;
25
+ has :protect prot_attrib:int = 0;
19
26
 
20
- can :pub bark() {
21
- return "Woof! Woof!";
27
+ can do_base() -> None {
28
+ self.publ_attrib; # <-- okey.
29
+ self.priv_attrib; # <-- okey.
30
+ self.prot_attrib; # <-- okey.
22
31
  }
32
+ }
23
33
 
24
- can :pub makeSound() {
25
- return "The dog says: " + super.introduce();
34
+
35
+ obj DrivedClass1 :BaseClass: {
36
+ can do_driv1() -> None {
37
+ self.publ_attrib; # <-- okey.
38
+ self.priv_attrib; # <-- not okey.
39
+ self.prot_attrib; # <-- okey.
26
40
  }
27
- obj Body {
28
- has :pub s: str="22";
41
+ }
42
+
43
+
44
+ # Check if the protect works from inherited chain.
45
+ obj DrivedClass2 :BaseClass: {
46
+ can do_driv2() -> None {
47
+ self.publ_attrib; # <-- okey.
48
+ self.priv_attrib; # <-- not okey.
49
+ self.prot_attrib; # <-- okey.
29
50
  }
30
51
  }
31
- can :priv overide_check() {
32
- return "inside access_modifier";
52
+
53
+
54
+
55
+ obj :pub Chain1 {
56
+ has :priv priv_val:int = 0; # <-- the private in the chain.
57
+ }
58
+
59
+ obj :pub Chain2 {
60
+ has :pub chain1:Chain1 = Chain1();
61
+ }
62
+
63
+ obj :pub Chain3 {
64
+ has :pub chain2:Chain2 = Chain2();
33
65
  }
34
- glob :priv a=2, c=7, m="hi";
66
+
67
+
35
68
  with entry {
36
- myDog = Dog(breed= "Golden Retriever");
37
-
38
- print( " Name: " + myDog.species );
39
- print( " Breed: " + myDog.breed );
40
- print( myDog.introduce() );
41
- print( myDog.bark() );
42
- b=myDog.Body("33");
43
- print(a);
44
- account = BankAccount(3333);
45
- print(privmethod());
46
- print(overide_check());
47
- print(b);
48
- print(p);
69
+ SomeObj.InnerPublObj; # <-- okey.
70
+ SomeObj.InnerPrivObj; # <-- not okey.
71
+ SomeObj.InnerProtObj; # <-- not okey.
72
+
73
+ SomeObj.InnerPublEnum; # <-- okey.
74
+ SomeObj.InnerPrivEnum; # <-- not okey.
75
+ SomeObj.InnerProtEnum; # <-- not okey.
76
+
77
+ some_obj = SomeObj();
78
+
79
+ some_obj.InnerPublObj; # <-- okey.
80
+ some_obj.InnerPrivObj; # <-- not okey.
81
+ some_obj.InnerProtObj; # <-- not okey.
82
+
83
+ some_obj.InnerPublEnum; # <-- okey.
84
+ some_obj.InnerPrivEnum; # <-- not okey.
85
+ some_obj.InnerProtEnum; # <-- not okey.
86
+
87
+ some_obj.publ_attrib; # <-- okey.
88
+ some_obj.priv_attrib; # <-- not okey.
89
+ some_obj.prot_attrib; # <-- not okey.
90
+
91
+ some_obj.publ_ability(); # <-- okey.
92
+ some_obj.priv_ability(); # <-- not okey.
93
+ some_obj.prot_ability(); # <-- not okey.
94
+
95
+ chain3: Chain3 = Chain3();
96
+ chain3.chain2.chain1; # <-- okey.
97
+ chain3.chain2.chain1.priv_val; # <-- not okey.
98
+
99
+ access_checker.ModulePublObj(); # <-- okey.
100
+ access_checker.ModulePrivObj(); # <-- not okey.
101
+
102
+ access_checker.module_priv_glob; # <-- okey.
103
+ access_checker.module_priv_glob; # <-- not okey.
49
104
  }
@@ -0,0 +1,3 @@
1
+ can speak {
2
+ HasFault();
3
+ }
@@ -0,0 +1,34 @@
1
+ # Define a simple node type called `Item`
2
+ node Item {
3
+ has value: int = 0;
4
+ }
5
+
6
+ # Define an edge type called `Link`
7
+ edge Link {}
8
+
9
+ # Define the `bar` walker
10
+ walker bar_walk {
11
+ has count: int = 0;
12
+
13
+ # Start walking from the root node or an Item node
14
+ can start with `root | Item entry {
15
+ here ++> Item();
16
+ if self.count < 5 {
17
+ visit [-->];
18
+ } else {
19
+ "Created 5 items." |> print;
20
+ disengage;
21
+ }
22
+ }
23
+
24
+ # Walk over Item nodes and update their values
25
+ can walk with Item entry {
26
+ here.value = self.count;
27
+ f"Item value: {here.value}" |> print;
28
+ self.count += 1;
29
+ visit [-->] else {
30
+ "Finished walking over all items." |> print;
31
+ disengage;
32
+ }
33
+ }
34
+ }
@@ -31,6 +31,7 @@ with entry{
31
31
  print(d2.count('a(val')==19,d2.count('#F5E5FF')==2 ,'Edge1' not in d2,d2.count('GenericEdge')==42);
32
32
  print(d3.count('a(val')==6,d3.count("GenericEdge")==5,d3.count('#F5E5FF')==1);
33
33
  print(d4.count("a(val")==25,d4.count("GenericEdge")==66,d4.count('#FFF0F')==3);
34
+ print(d5.count("Edge1(val=6)")==2, d5.count("GenericEdge()")==24);
34
35
  # print(l3<l2);
35
36
  # print(d1);
36
37
  # print(d2);
@@ -37,7 +37,7 @@ edge Edge_c {
37
37
 
38
38
  with entry {
39
39
  print(root spawn creator());
40
- print(root._jac_.gen_dot());
40
+ print(root.__jac__.gen_dot());
41
41
  print([root-:Edge_a:->]);
42
42
  print([root-:Edge_c:->]);
43
43
  print([root-:Edge_a:->-:Edge_b:->]);
@@ -22,7 +22,7 @@ edge MyEdge {
22
22
  for j=0 to j<3 by j+=1 {
23
23
  end +:MyEdge:val=random.randint(1, 15), val2=random.randint(1, 5):+> node_a(value=j + 10);
24
24
  }
25
- print([(i.val, i.val2) for i in end._jac_.edges if isinstance(i, MyEdge)]);
25
+ print([(arch.val, arch.val2) for i in end.__jac__.edges if isinstance(arch := i.architype, MyEdge)]);
26
26
  }
27
27
  }
28
28
  for i=0 to i<3 by i+=1 {
@@ -30,7 +30,7 @@ edge Edge_c{
30
30
 
31
31
  with entry{
32
32
  print(root spawn creator());
33
- print(root._jac_.gen_dot());
33
+ print(root.__jac__.gen_dot());
34
34
  print([root -:Edge_a:->]);
35
35
  print([root -:Edge_c:->]);
36
36
  print([root -:Edge_a:-> -:Edge_b:->]);
@@ -0,0 +1,43 @@
1
+ import:py from jaclang.plugin.feature, JacFeature as Jac;
2
+ import:py from jaclang.runtimelib.machine, JacMachine;
3
+ import:jac from bar, bar_walk;
4
+ # Test runner to initialize the walker
5
+
6
+ can test_run {
7
+ # Print the loaded modules
8
+ modules = JacMachine.get().list_modules();
9
+ "Loaded Modules:" |> print;
10
+ for mod_name in modules {
11
+ f"Module: {mod_name}" |> print;
12
+ }
13
+ # Print walkers
14
+ walkers = JacMachine.get().list_walkers(mod_name);
15
+ if walkers {
16
+ f"Walkers in {mod_name}:" |> print;
17
+ for walker in walkers {
18
+ f" - Walker: {walker}" |> print;
19
+ }
20
+ }
21
+ # Print nodes
22
+ nodes = JacMachine.get().list_nodes(mod_name);
23
+ if nodes {
24
+ f"Nodes in {mod_name}:" |> print;
25
+ for node in nodes {
26
+ f" - Node: {node}" |> print;
27
+ }
28
+ }
29
+ # Print edges
30
+ edges = JacMachine.get().list_edges(mod_name);
31
+ if edges {
32
+ f"Edges in {mod_name}:" |> print;
33
+ for edge in edges {
34
+ f" - Edge: {edge}" |> print;
35
+ }
36
+ }
37
+ root spawn bar_walk();
38
+ }
39
+ # Define the entry point to run the test
40
+
41
+ with entry {
42
+ test_run();
43
+ }
@@ -1,5 +1,5 @@
1
1
  import:py random;
2
- import:py from typing { Tuple }
2
+ import:py from typing, Tuple;
3
3
 
4
4
  obj Button {
5
5
  can is_pressed(pos: tuple, pressed: str) -> bool {
@@ -73,5 +73,5 @@ with entry {
73
73
  root spawn walker1();
74
74
  root spawn walker2();
75
75
  root spawn walker3();
76
- print(root._jac_.gen_dot());
76
+ print(root.__jac__.gen_dot());
77
77
  }
@@ -0,0 +1,9 @@
1
+ import:py os;
2
+ import:py sys;
3
+ import:py pyfunc;
4
+ import:py pygame_mock.inner;
5
+ import:py pygame_mock.inner.inner_mod;
6
+ import:py math;
7
+ import:py argparse;
8
+ import:py from pygame_mock { color, display }
9
+ import:py pygame_mock;
@@ -0,0 +1,30 @@
1
+ obj fruit {
2
+ has name: str,
3
+ color: str;
4
+ }
5
+
6
+ glob a: list[fruit] = [
7
+ fruit(name="apple", color="red"),
8
+ fruit(name="banana", color="yellow"),
9
+ fruit(name="grape", color="purple")
10
+ ];
11
+
12
+ glob b: dict[str, fruit] = {
13
+ "a": fruit(name="apple", color="red"),
14
+ "b": fruit(name="banana", color="yellow"),
15
+ "c": fruit(name="grape", color="purple")
16
+ };
17
+
18
+ can foo(a: list[fruit]) -> list[fruit] {
19
+ return a[0:2];
20
+ }
21
+
22
+ with entry {
23
+ fruit_1 = a[0];
24
+ clr_1 = a[0].color;
25
+ clr_1 = b["a"].color;
26
+ f_clr = foo(a);
27
+ f_clrw = foo(a)[0];
28
+ f_clrw2 = foo(a)[0:1][0].color;
29
+ # print(foo(a)[0].color);
30
+ }
@@ -0,0 +1,12 @@
1
+ node MyNode {
2
+ has value: int = 0;
3
+ }
4
+
5
+ with entry {
6
+ root ++> (x:=MyNode());
7
+ obj_id = jid(x);
8
+ myobj = &obj_id;
9
+ print(obj_id);
10
+ print(myobj);
11
+ print("valid:", myobj == x);
12
+ }
@@ -79,7 +79,7 @@ for i in range(a):
79
79
  break
80
80
  print(b)
81
81
  else:
82
- print("Loop completed normally{}".format(i))
82
+ print(f"Loop completed normally{i}")
83
83
 
84
84
 
85
85
  def fooo45() -> None:
@@ -1,9 +1,9 @@
1
+ from __future__ import annotations
2
+
1
3
  # flake8: noqa
2
4
 
3
5
  """Python function for testing py imports."""
4
6
 
5
- from __future__ import annotations
6
-
7
7
 
8
8
  def count_up_to(n: int):
9
9
  """Count up to n"""
@@ -0,0 +1,3 @@
1
+ from .display import *
2
+ from .color import *
3
+ from .constants import *
@@ -0,0 +1,3 @@
1
+ class Color:
2
+ def __init__(self, value: int | str) -> None:
3
+ pass
@@ -0,0 +1,5 @@
1
+ CONST_VALUE: int = 0
2
+
3
+
4
+ class CL:
5
+ CONST_VALUE2: str = "h"
@@ -0,0 +1,2 @@
1
+ def set_mode(a, b):
2
+ pass
File without changes
@@ -0,0 +1,2 @@
1
+ def hello_world():
2
+ print("Hello")
jaclang/tests/test_cli.py CHANGED
@@ -98,17 +98,14 @@ class JacCliTests(TestCase):
98
98
 
99
99
  def test_jac_test_err(self) -> None:
100
100
  """Basic test for pass."""
101
- if "jaclang.tests.fixtures.err" in sys.modules:
102
- del sys.modules["jaclang.tests.fixtures.err"]
103
101
  captured_output = io.StringIO()
104
102
  sys.stdout = captured_output
105
103
  sys.stderr = captured_output
106
- cli.test(self.fixture_abs_path("err.jac"))
104
+ cli.test(self.fixture_abs_path("baddy.jac"))
107
105
  sys.stdout = sys.__stdout__
108
106
  sys.stderr = sys.__stderr__
109
107
  stdout_value = captured_output.getvalue()
110
- # print(stdout_value)
111
- path_to_file = self.fixture_abs_path("err.test.jac")
108
+ path_to_file = self.fixture_abs_path("baddy.test.jac")
112
109
  self.assertIn(f'"{path_to_file}", line 2,', stdout_value)
113
110
 
114
111
  def test_jac_ast_tool_pass_template(self) -> None:
@@ -147,6 +144,52 @@ class JacCliTests(TestCase):
147
144
  stdout_value = captured_output.getvalue()
148
145
  self.assertIn("+-- Token", stdout_value)
149
146
 
147
+ def test_import_mod_abs_path(self) -> None:
148
+ """Testing for print AstTool."""
149
+ captured_output = io.StringIO()
150
+ sys.stdout = captured_output
151
+
152
+ cli.tool("ir", ["ast", f"{self.fixture_abs_path('import.jac')}"])
153
+
154
+ sys.stdout = sys.__stdout__
155
+ stdout_value = captured_output.getvalue()
156
+ self.assertRegex(
157
+ stdout_value,
158
+ r"1\:11 \- 1\:13.*ModulePath - os - abs_path\:.*typeshed/stdlib/os/__init__.pyi",
159
+ )
160
+ self.assertRegex(
161
+ stdout_value,
162
+ r"2\:11 \- 2\:14.*ModulePath - sys - abs_path\:.*typeshed/stdlib/sys/__init__.pyi",
163
+ )
164
+ self.assertRegex(
165
+ stdout_value,
166
+ r"3\:11 \- 3\:17.*ModulePath - pyfunc - abs_path\:.*fixtures/pyfunc.py",
167
+ )
168
+ self.assertRegex(
169
+ stdout_value,
170
+ r"4\:11 \- 4\:28.*ModulePath - pygame_mock - abs_path\:.*fixtures/pygame_mock/inner/__init__.py",
171
+ )
172
+ self.assertRegex(
173
+ stdout_value,
174
+ r"6\:11 \- 6\:15.*ModulePath - math - abs_path\:.*typeshed/stdlib/math.pyi",
175
+ )
176
+ self.assertRegex(
177
+ stdout_value,
178
+ r"7\:11 \- 7\:19.*ModulePath - argparse - abs_path\:.*typeshed/stdlib/argparse.pyi",
179
+ )
180
+ self.assertRegex(
181
+ stdout_value,
182
+ r"8\:16 \- 8\:27.*ModulePath - pygame_mock - abs_path\:.*fixtures/pygame_mock/__init__.py",
183
+ )
184
+ self.assertRegex(
185
+ stdout_value,
186
+ r"8\:30 \- 8:35.*ModuleItem - color - abs_path\:.*fixtures/pygame_mock/color.py",
187
+ )
188
+ self.assertRegex(
189
+ stdout_value,
190
+ r"8\:37 \- 8:44.*ModuleItem - display - abs_path\:.*fixtures/pygame_mock/display.py",
191
+ )
192
+
150
193
  def test_ast_dotgen(self) -> None:
151
194
  """Testing for print AstTool."""
152
195
  captured_output = io.StringIO()
@@ -165,7 +208,7 @@ class JacCliTests(TestCase):
165
208
  cli.check(f"{self.fixture_abs_path('game1.jac')}")
166
209
  sys.stdout = sys.__stdout__
167
210
  stdout_value = captured_output.getvalue()
168
- self.assertIn("Errors: 0, Warnings: 1", stdout_value)
211
+ self.assertIn("Errors: 0, Warnings: 2", stdout_value)
169
212
 
170
213
  def test_type_info(self) -> None:
171
214
  """Testing for type info inside the ast tool."""