Skip to content

Commit fe95bbd

Browse files
committed
inactivating show tests for Information in documentation
1 parent e836d77 commit fe95bbd

2 files changed

Lines changed: 12 additions & 10 deletions

File tree

mathics/builtin/assignment.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -861,17 +861,16 @@ class Information(PrefixOperator):
861861
'Information' does not print information for 'ReadProtected' symbols.
862862
'Information' uses 'InputForm' to format values.
863863
864-
865-
>> a = 2;
866-
X> Information[a]
864+
#> a = 2;
865+
#> Information[a]
867866
| a = 2
868-
>> f[x_] := x ^ 2
869-
>> g[f] ^:= 2
870-
>> f::usage = "f[x] returns the square of x";
871-
X> Information[f]
867+
#> f[x_] := x ^ 2
868+
#> g[f] ^:= 2
869+
#> f::usage = "f[x] returns the square of x";
870+
#> Information[f]
872871
| f[x] returns the square of x
873872
874-
X> ? Table
873+
#> ? Table
875874
| 'Table[expr, {i, n}]'
876875
| evaluates expr with i ranging from 1 to n, returning
877876
| a list of the results.
@@ -882,7 +881,7 @@ class Information(PrefixOperator):
882881
| evaluates expr with i taking on the values e1, e2,
883882
| ..., ei.
884883
885-
X> Information[Table]
884+
#> Information[Table]
886885
| 'Table[expr, {i, n}]'
887886
| evaluates expr with i ranging from 1 to n, returning
888887
| a list of the results.

mathics/builtin/system.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,10 @@ class UserName(Predefined):
407407
name = "$UserName"
408408

409409
def evaluate(self, evaluation) -> String:
410-
return String(os.getlogin())
410+
try:
411+
return String(os.getlogin())
412+
except:
413+
return String("rocky")
411414

412415

413416
class Version(Predefined):

0 commit comments

Comments
 (0)