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

JOSS Review: Errors with pytest #37

Closed
ayush9pandey opened this issue Jul 6, 2023 · 3 comments
Closed

JOSS Review: Errors with pytest #37

ayush9pandey opened this issue Jul 6, 2023 · 3 comments

Comments

@ayush9pandey
Copy link

I installed the software and ran pytest. I get the following two errors:


self = <test_timecourse.TestTimeCourse testMethod=test_general_run>

    def test_general_run(self):
        dm = basico.load_example('bruss')
        plots = []
>       basico.run_task(basico.T.TIME_COURSE, model=dm, plots=plots)
E       AttributeError: module 'basico' has no attribute 'run_task'

tests/test_timecourse.py:49: AttributeError
____________________________________________________________ TestTimeCourse.test_general_run_sedml ____________________________________________________________

self = <test_timecourse.TestTimeCourse testMethod=test_general_run_sedml>

    def test_general_run_sedml(self):
        dm = basico.load_model(os.path.join(THIS_DIR, 'sedml.xml'))
        plots = []
>       basico.run_scheduled_tasks(include_plots=False, include_general_plots=True, plots=plots, model=dm)
E       AttributeError: module 'basico' has no attribute 'run_scheduled_tasks'. Did you mean: 'get_scheduled_tasks'?

tests/test_timecourse.py:56: AttributeError
@fbergmann
Copy link
Member

I usually run these tests using:

python -m pytest

from the root directory. This includes the 'basico' directory from it. I suppose I could try and append .. to the sys.path variable in case the imports don't succeed.

@ayush9pandey
Copy link
Author

python -m pytest works! I'm fine with however you'd like to keep it, so we can close this issue :)

@fbergmann
Copy link
Member

I've decided to leave thins as they are, and just added some explanation on how to run the tests to the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants