Download construction/tests/test_prosite_patterns.py from HFMI-PROFOUND/BILBY-PRO: direct link, hf CLI and curl.
- Browser
- Download file 812 Bytes
-
https://huggingface.co/datasets/HFMI-PROFOUND/BILBY-PRO/resolve/main/construction/tests/test_prosite_patterns.py
- Command line
-
hf download hf://datasets/HFMI-PROFOUND/BILBY-PRO/construction/tests/test_prosite_patterns.py
-
curl -L -o test_prosite_patterns.py https://huggingface.co/datasets/HFMI-PROFOUND/BILBY-PRO/resolve/main/construction/tests/test_prosite_patterns.py
812 Bytes
| # Copyright 2026 Emile de Bruyn | |
| # SPDX-License-Identifier: Apache-2.0 | |
| import pytest | |
| from motifbench_prosite.prosite_patterns import classify_prosite, prosite_span | |
| def test_prosite_span_known_lengths(pattern, expected): | |
| assert prosite_span(pattern) == expected | |
| def test_classify_prosite_flags_variable_pattern(): | |
| info = classify_prosite("A-x(2,4)-B") | |
| assert info["min_span"] == 4 | |
| assert info["max_span"] == 6 | |
| assert info["fixed_length"] is False | |
| assert info["variable_length"] is True | |
| assert info["contiguous"] is True | |
| assert info["non_contiguous"] is False | |