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

Test for biomass SBO term checks for presence rather than presence #600

Closed
gregmedlock opened this issue Jan 28, 2019 · 1 comment · Fixed by #601
Closed

Test for biomass SBO term checks for presence rather than presence #600

gregmedlock opened this issue Jan 28, 2019 · 1 comment · Fixed by #601

Comments

@gregmedlock
Copy link
Member

Problem description

The test for the biomass SBO term on biomass reactions fails when the term is actually present because test_biomass_specific_sbo_presence in test_sbo.py is checking for presence of terms, but the search for specific SBO terms only returns an element if the element is missing the term.

Specifically, this line returns ids of elements that are missing the SBO term:

ann["data"] = get_ids(sbo.check_component_for_specific_sbo_term( biomass, "SBO:0000629"))

But the assert statement at the end of the test is expecting ann["data] to be of the same length as the number of biomass reactions; I think this should be 0 instead:

assert len(ann["data"]) == len(biomass), ann["message"]

I can create a PR for this and updated unit tests soon. The change is small, so might be worth doing before resolving #469

System Information ================== OS Linux OS-release 4.4.0-140-generic Python 3.5.2

Package Versions

Jinja2 2.10
click 6.7
click-configfile 0.2.3
click-log 0.3.2
cobra 0.13.3
cookiecutter 1.6.0
depinfo 1.4.0
equilibrator_api 0.1.26
future 0.16.0
gitpython 2.1.11
goodtables 1.0.0
importlib_resources 1.0.2
memote 0.8.11
numpydoc 0.8.0
pandas 0.23.4
pip 18.1
pygithub 1.43.4
pylru 1.1.0
pytest 3.7.2
python-libsbml 5.17.0
requests 2.19.1
ruamel.yaml 0.14.12
setuptools 40.6.3
six 1.11.0
sqlalchemy 1.3.0b1
sympy 1.2
travis-encrypt 1.1.2
travispy 0.3.5
wheel 0.32.3

@Midnighter
Copy link
Member

Please go ahead 👍

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

Successfully merging a pull request may close this issue.

2 participants