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

plug-in model unit tests from python shell not always working? (Trac #748) #864

Closed
RichardHeenan opened this issue Mar 30, 2019 · 3 comments
Assignees
Labels
Defect Bug or undesirable behaviour Minor Small job
Milestone

Comments

@RichardHeenan
Copy link
Contributor

RichardHeenan commented Mar 30, 2019

from sasmodels.model_test import run_one
run_one("~/.sasview/plugin_models/hollow_cylinder_new.py")

got this to work on a simple only .py model, but but my hollow_cylinder_new.py failed with an "index out of range", see below. The identical code passed tests ok from cmd window with
python -m sasmodels.model_test hollow_cylinder_new

from sasmodels.model_test import run_one
run_one("~/.sasview/plugin_models/hollow_cylinder_new.py")
Traceback (most recent call last):
File "", line 1, in
File "C:\stfc\sasview4\sasmodels\sasmodels\model_test.py", line 293, in run_one
if not suite._tests[0].info.tests:
IndexError: list index out of range

Migrated from http://trac.sasview.org/ticket/748

{
    "status": "closed",
    "changetime": "2016-10-10T14:53:28",
    "_ts": "2016-10-10 14:53:28.515310+00:00",
    "description": "from sasmodels.model_test import run_one\nrun_one(\"~/.sasview/plugin_models/hollow_cylinder_new.py\")\n\ngot this to work on a simple only .py model, but but my hollow_cylinder_new.py failed with an \"index out of range\", see below. The identical code passed tests ok from cmd window with\npython -m sasmodels.model_test hollow_cylinder_new\n\n\n\nfrom sasmodels.model_test import run_one\nrun_one(\"~/.sasview/plugin_models/hollow_cylinder_new.py\")\nTraceback (most recent call last):\n  File \"<input>\", line 1, in <module>\n  File \"C:\\stfc\\sasview4\\sasmodels\\sasmodels\\model_test.py\", line 293, in run_one\n    if not suite._tests[0].info.tests:\nIndexError: list index out of range\n",
    "reporter": "richardh",
    "cc": "",
    "resolution": "duplicate",
    "workpackage": "SasView Bug Fixing",
    "time": "2016-10-09T16:18:55",
    "component": "SasView",
    "summary": "plug-in model unit tests from python shell not always working?",
    "priority": "minor",
    "keywords": "",
    "milestone": "SasView 4.1.0",
    "owner": "pkienzle",
    "type": "defect"
}
@RichardHeenan
Copy link
Contributor Author

Trac update at 2016/10/09 16:19:31: richardh changed attachment from "" to "hollow_cylinder_new.py"

@RichardHeenan
Copy link
Contributor Author

Trac update at 2016/10/09 16:19:46: richardh changed attachment from "" to "hollow_cylinder_new.c"

@pkienzle
Copy link
Contributor

Trac update at 2016/10/10 14:53:28:

  • pkienzle commented:

See #832

  • pkienzle changed resolution from "" to "duplicate"
  • pkienzle changed status from "new" to "closed"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Defect Bug or undesirable behaviour Minor Small job
Projects
None yet
Development

No branches or pull requests

2 participants