diff --git a/mathics/builtin/scoping.py b/mathics/builtin/scoping.py index c010f1d05f..2d68f0d44b 100644 --- a/mathics/builtin/scoping.py +++ b/mathics/builtin/scoping.py @@ -650,6 +650,9 @@ class BeginPackage(Builtin): Protect[System`Private`$ContextPathStack, System`$Packages]; context """, + # "BeginPackage[context_String, needs__]": """ + # BeginPackage[context]; Needs[Map[Needs, needs]]; + # """ } @@ -680,6 +683,7 @@ class EndPackage(Builtin): System`Private`newctx], Most[System`Private`$ContextPathStack]}; Protect[System`Private`$ContextPathStack]; + Print["EndPackage: "<>System`Private`$ContextStack]; Null]] """, } diff --git a/mathics/packages/KnotTheory/init.m b/mathics/packages/KnotTheory/init.m index 6445f55a11..4211b03f1a 100644 --- a/mathics/packages/KnotTheory/init.m +++ b/mathics/packages/KnotTheory/init.m @@ -767,7 +767,9 @@ crossing and False if it is positive (right handed). End[]; EndPackage[] -BeginPackage["KnotTheory`", {"TubePlot`"}] +(* BeginPackage["KnotTheory`", {"TubePlot`"}]*) +Needs["TubePlot`"]; +BeginPackage["KnotTheory`"] TorusKnot; @@ -781,7 +783,7 @@ crossing and False if it is positive (right handed). TubePlotPrelude -> EdgeForm[{}], Boxed -> False, ViewPoint -> {0, 0, 1} ]; -End[]; (*EndPackage[]*) +End[]; EndPackage[] (* End source file src/TubePlot.m*) diff --git a/test/test_knottheory.py b/test/test_knottheory.py index 9b3645eba2..8176f76654 100644 --- a/test/test_knottheory.py +++ b/test/test_knottheory.py @@ -1,4 +1,7 @@ # -*- coding: utf-8 -*- +import os +import pytest + from .helper import evaluate, check_evaluation import pytest @@ -10,6 +13,8 @@ ) +@pytest.mark.skipif(not os.environ.get("KnotTheory", False), + reason="set environment varable KnotTheory to run this test") def test_knottheory(): evaluate( """K = PD[X[1,9,2,8], X[3,10,4,11],