Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ docs :
cd docs; echo "Running Sphinx docs generator"; sphinx-apidoc -o source/ ../biocrnpyler; python generate_nblinks.py; make clean && make html;

TAGS: biocrnpyler/*.py biocrnpyler/*/*.py biocrnpyler/*/*/*.py docs/*.rst \
docs/examples/*.ipynb
docs/examples/*.ipynb docs/examples/*/*.ipynb
ftags $^
18 changes: 18 additions & 0 deletions Tests/test_combinatorial_complex.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,3 +401,21 @@ def R(inputs, outputs):
R([CXZ, X], [CXXZ]),
]
assert all([r in r5_true for r in r5]) and all([r in r5 for r in r5_true])


def test_singleton_arguments():
X, Y, Z = Species('X'), Species('Y'), Species('Z')

# Single final_state case
C1 = Complex([Y, Z, Z])
CC1 = CombinatorialComplex(final_states=C1)

# tests getters and setters
assert set(CC1.final_states) == set([C1])
assert set(CC1.sub_species) == set([Y, Z])
assert set(CC1.initial_states) == set([Y, Z])
assert CC1.intermediate_states is None

# Test with excluded states
C2 = Complex([X, X, Z, Z])
CC5 = CombinatorialComplex(final_states=[C2], excluded_states=C1)
Loading
Loading