Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating to Mathics7 #2

Merged
merged 4 commits into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions pymathics/hello/__main__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
from mathics.builtin.base import Builtin, String
from mathics.core.atoms import String
from mathics.core.builtin import Builtin


class Hello(Builtin):
Expand All @@ -13,7 +14,7 @@ class Hello(Builtin):
"""

# The function below should start with "apply"
def apply_with_name(self, person, evaluation):
def eval_with_name(self, person, evaluation):
"%(name)s[person_String]"
# %(name)s is just a more flexible way of writing "Hello".
# If the class name changes, so will the above pattern.
Expand Down
2 changes: 1 addition & 1 deletion pymathics/hello/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# well as importing into Python. That's why there is no
# space around "=" below.
# fmt: off
__version__="5.0.0dev1" # noqa
__version__="7.0.0dev1" # noqa
7 changes: 6 additions & 1 deletion test/test_hello.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# -*- coding: utf-8 -*-

from mathics.core.load_builtin import import_and_load_builtins
from mathics.session import MathicsSession

session = MathicsSession(add_builtin=True, catch_interrupt=False)
import_and_load_builtins()

session = MathicsSession(character_encoding="ASCII")


def check_evaluation(str_expr: str, expected: str, message=""):
Expand Down
Loading