This file contains unit tests for the error_correct_intbcs_to_whitelist
function in the Cassiopeia package. The tests verify the functionality of correcting integration barcodes (intBCs) to a whitelist, using both a file path and a list as input for the whitelist.
The code defines a single test class TestErrorCorrectIntBCstoWhitelist
with a setUp
method to initialize test data and two test methods to verify the correction functionality.
A test class that inherits from unittest.TestCase
, containing setup and test methods for the error_correct_intbcs_to_whitelist
function.
setUp
method, including a whitelist file path, a whitelist list, and a DataFrame with sample data.Initializes test data, including file paths, whitelist, and a sample DataFrame.
Tests the error_correct_intbcs_to_whitelist
function using a file path for the whitelist.
cassiopeia.pp.error_correct_intbcs_to_whitelist
with the sample DataFrame and whitelist file path.pd.testing.assert_frame_equal
.Tests the error_correct_intbcs_to_whitelist
function using a list for the whitelist.
cassiopeia.pp.error_correct_intbcs_to_whitelist
with the sample DataFrame and whitelist list.pd.testing.assert_frame_equal
.Dependency | Purpose |
---|---|
os | File path operations |
unittest | Unit testing framework |
numpy | Not directly used in the code |
pandas | Data manipulation and testing |
cassiopeia | Package being tested |
The code relies on the default error handling provided by the unittest framework. No specific error handling mechanisms are implemented in this test file.
This file contains unit tests for the error_correct_intbcs_to_whitelist
function in the Cassiopeia package. The tests verify the functionality of correcting integration barcodes (intBCs) to a whitelist, using both a file path and a list as input for the whitelist.
The code defines a single test class TestErrorCorrectIntBCstoWhitelist
with a setUp
method to initialize test data and two test methods to verify the correction functionality.
A test class that inherits from unittest.TestCase
, containing setup and test methods for the error_correct_intbcs_to_whitelist
function.
setUp
method, including a whitelist file path, a whitelist list, and a DataFrame with sample data.Initializes test data, including file paths, whitelist, and a sample DataFrame.
Tests the error_correct_intbcs_to_whitelist
function using a file path for the whitelist.
cassiopeia.pp.error_correct_intbcs_to_whitelist
with the sample DataFrame and whitelist file path.pd.testing.assert_frame_equal
.Tests the error_correct_intbcs_to_whitelist
function using a list for the whitelist.
cassiopeia.pp.error_correct_intbcs_to_whitelist
with the sample DataFrame and whitelist list.pd.testing.assert_frame_equal
.Dependency | Purpose |
---|---|
os | File path operations |
unittest | Unit testing framework |
numpy | Not directly used in the code |
pandas | Data manipulation and testing |
cassiopeia | Package being tested |
The code relies on the default error handling provided by the unittest framework. No specific error handling mechanisms are implemented in this test file.