File: test_solution.py

package info (click to toggle)
python-cobra 0.29.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 11,512 kB
  • sloc: python: 14,703; xml: 12,841; makefile: 137; sh: 32
file content (19 lines) | stat: -rw-r--r-- 555 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
"""Test functions of solution.py ."""

from typing import TYPE_CHECKING, Tuple

from cobra.core import Solution


if TYPE_CHECKING:
    from cobra import Model


def test_solution_contains_only_reaction_specific_values(
    solved_model: Tuple[Solution, "Model"]
) -> None:
    """Test solution contains specific reaction values."""
    solution, model = solved_model
    reaction_ids = set([reaction.id for reaction in model.reactions])
    assert set(solution.fluxes.index) == reaction_ids
    # assert set(solution.reduced_costs.index) == reaction_ids