cassiopeia/mixins/utilities.py
. It tests the functionality of various utility functions related to handling ambiguous states in character matrices and finding duplicate groups.
unittest.TestCase
. It contains several test methods to verify the functionality of utility functions from the cassiopeia.mixins.utilities
module.
test_is_ambiguous_state
: Tests the is_ambiguous_state
function.test_unravel_states
: Tests the unravel_ambiguous_states
function.test_find_duplicated_character_states
: Tests the find_duplicate_groups
function.is_ambiguous_state
function from the utilities module.
(1, 2)
is recognized as an ambiguous state.1
is not recognized as an ambiguous state.unravel_ambiguous_states
function from the utilities module.
find_duplicate_groups
function from the utilities module.
find_duplicate_groups
function on the character matrix.Dependency | Purpose |
---|---|
unittest | Provides the testing framework |
pandas | Used to create and manipulate the character matrix |
cassiopeia.mixins.utilities | Module containing the utility functions being tested |
AssertionError
will be raised, indicating a test failure.
unittest
framework, which is a standard Python testing library.test_find_duplicated_character_states
method uses a complex character matrix with ambiguous states to thoroughly test the find_duplicate_groups
function.