Skip to content

Commit bfda5ff

Browse files
mmaterarocky
authored andcommitted
Fix tests for multiline prints
1 parent 5d8e644 commit bfda5ff

4 files changed

Lines changed: 16 additions & 56 deletions

File tree

mathics/builtin/assignment.py

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
#!/usr/bin/env python3
21
# -*- coding: utf-8 -*-
32

4-
53
import mathics.builtin
64
from mathics.builtin.base import (
75
Builtin, BinaryOperator, PostfixOperator, PrefixOperator)
@@ -892,27 +890,7 @@ class Information(PrefixOperator):
892890
893891
894892
#> ? Table
895-
| 'Table[expr, {i, n}]'
896-
| evaluates expr with i ranging from 1 to n, returning
897-
| a list of the results.
898-
| 'Table[expr, {i, start, stop, step}]'
899-
| evaluates expr with i ranging from start to stop,
900-
| incrementing by step.
901-
| 'Table[expr, {i, {e1, e2, ..., ei}}]'
902-
| evaluates expr with i taking on the values e1, e2,
903-
| ..., ei.
904-
905-
#> Information[Table]
906-
| 'Table[expr, {i, n}]'
907-
| evaluates expr with i ranging from 1 to n, returning
908-
| a list of the results.
909-
| 'Table[expr, {i, start, stop, step}]'
910-
| evaluates expr with i ranging from start to stop,
911-
| incrementing by step.
912-
| 'Table[expr, {i, {e1, e2, ..., ei}}]'
913-
| evaluates expr with i taking on the values e1, e2,
914-
| ..., ei.
915-
|
893+
|
916894
. 'Table[expr, {i, n}]'
917895
. evaluates expr with i ranging from 1 to n, returning
918896
. a list of the results.
@@ -926,7 +904,7 @@ class Information(PrefixOperator):
926904
= Null
927905
928906
#> Information[Table]
929-
|
907+
|
930908
. 'Table[expr, {i, n}]'
931909
. evaluates expr with i ranging from 1 to n, returning
932910
. a list of the results.

mathics/doc/doc.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env python3
21
# -*- coding: utf-8 -*-
32

43
import re

mathics/test.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,19 @@ def fail(why):
9090
info = sys.exc_info()
9191
sys.excepthook(*info)
9292
return False
93-
93+
if False:
94+
print("out=-----------------")
95+
for rr in out:
96+
for line in rr.text.splitlines():
97+
print(" <",line,">")
98+
print("wanted_out=-------------------")
99+
for rr in wanted_out:
100+
for line in rr.text.splitlines():
101+
print(" <",line,">")
102+
print("---------------------------------")
103+
94104
if not compare(result, wanted):
105+
print("result =!=wanted")
95106
fail_msg = "Result: %s\nWanted: %s" % (result, wanted)
96107
if out:
97108
fail_msg += "\nAdditional output:\n"
@@ -102,6 +113,8 @@ def fail(why):
102113
output_ok = False
103114
else:
104115
for got, wanted in zip(out, wanted_out):
116+
if False:
117+
print("got=<",got,"> wanted=<",wanted,">")
105118
if not got == wanted:
106119
output_ok = False
107120
break

test/test_file.py

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)