seismicrna.core.tests package
Submodules
- class seismicrna.core.tests.array_test.TestCalcInverse(methodName='runTest')
Bases:
TestCase- test_calc_inverse()
Invert an array with a known inverse.
- test_calc_inverse_fill_fwd()
Invert an array with a known inverse; fill forward.
- test_calc_inverse_fill_fwd_max()
- test_calc_inverse_fill_fwd_max_default()
- test_calc_inverse_fill_rev()
Invert an array with a known inverse; fill reverse.
- test_calc_inverse_fill_rev_max()
- test_calc_inverse_fill_rev_max_default()
- test_calc_inverse_max()
Invert an array with a known inverse.
- test_empty()
- test_empty_max()
- test_is_inverse()
Verify every position in the inverse of a random array.
- test_negative()
Negative values in the target are not permitted.
- test_repeated()
Repeated values in the target are not permitted.
- class seismicrna.core.tests.array_test.TestEnsureSameLength(methodName='runTest')
Bases:
TestCase- test_diff_lengths()
Unequal lengths are not permitted.
- test_other_dims()
Non-1D arrays are not valid.
- test_same_length()
The length is returned when the arrays share the length.
- class seismicrna.core.tests.array_test.TestFindDims(methodName='runTest')
Bases:
TestCase- test_0d()
- test_0d_1dim()
- test_0d_none()
- test_0d_nonzero()
- test_0d_nonzero_extra()
- test_1d()
- test_1d_0dim_none()
- test_1d_1d_crossed()
- test_1d_1d_separate()
- test_1d_1dim_none()
- test_1d_2d_congruent()
- test_1d_2d_crossed()
- test_1d_2dim()
- test_1d_2dim_none()
- test_1d_nonzero()
- test_2d()
- test_2d_1dim_none()
- test_2d_2d_congruent()
- test_2d_2d_crossed()
- test_2d_nonzero()
- test_empty()
- test_none_2d()
- class seismicrna.core.tests.array_test.TestGetLength(methodName='runTest')
Bases:
TestCase- test_1d()
A 1D array has a length.
- test_other_dims()
Non-1D arrays are not valid.
- class seismicrna.core.tests.array_test.TestIntersect1dUniqueSorted(methodName='runTest')
Bases:
TestCase- test_both_empty()
- test_random()
- test_x_empty()
- test_xy_1_element_diff()
- test_xy_1_element_same()
- test_xy_2_elements_diff()
- test_xy_2_elements_part()
- test_xy_2_elements_same()
- test_xy_longer()
- test_y_empty()
- class seismicrna.core.tests.array_test.TestLocateElements(methodName='runTest')
Bases:
TestCase- test_locate_0()
- test_locate_1()
- test_locate_2()
- test_locate_invalid()
- class seismicrna.core.tests.array_test.TestTriangular(methodName='runTest')
Bases:
TestCase- test_whole_numbers()
- class seismicrna.core.tests.header_test.TestClustHeader(methodName='runTest')
Bases:
TestCase- test_clustered()
- test_clusts()
- test_index()
- test_iter_clust_indexes()
- test_ks_invalid()
- test_ks_valid()
- test_level_keys()
- test_level_names()
- test_levels()
- test_modified_ks()
- test_modified_none()
- test_modified_rels()
- test_names()
- test_num_levels()
- test_select_clust()
- test_select_clusts()
- test_select_extra()
- test_select_invalid_clust()
- test_select_invalid_k()
- test_select_k()
- test_select_k_clust_empty()
- test_select_k_clust_exist()
- test_select_ks()
- test_select_ks_clusts_exist()
- test_select_none()
- test_signature()
- class seismicrna.core.tests.header_test.TestConstants(methodName='runTest')
Bases:
TestCase- test_average_prefix()
- test_clust_name()
- test_cluster_prefix()
- test_k_name()
- test_rel_name()
- class seismicrna.core.tests.header_test.TestDeduplicateRels(methodName='runTest')
Bases:
TestCase- test_duplicates()
- test_empty()
- test_no_duplicates()
- class seismicrna.core.tests.header_test.TestEqualHeaders(methodName='runTest')
Bases:
TestCase- test_clustheaders()
- test_different_types()
- test_relclustheaders()
- test_relheaders()
- class seismicrna.core.tests.header_test.TestFormatClustName(methodName='runTest')
Bases:
TestCase- test_positive()
- test_zero()
- class seismicrna.core.tests.header_test.TestFormatClustNames(methodName='runTest')
Bases:
TestCase- test_positive_invalid_dups()
- test_positive_no_dups()
- test_positive_valid_dups()
- test_zero()
- class seismicrna.core.tests.header_test.TestHeader(methodName='runTest')
Bases:
TestCase- test_abstract()
- class seismicrna.core.tests.header_test.TestListClusts(methodName='runTest')
Bases:
TestCase- test_positive()
- test_zero()
- class seismicrna.core.tests.header_test.TestListKClusts(methodName='runTest')
Bases:
TestCase- test_positive()
- test_zero()
- class seismicrna.core.tests.header_test.TestListKsClusts(methodName='runTest')
Bases:
TestCase- test_empty()
- test_ks()
- test_one_k()
- test_zero()
- class seismicrna.core.tests.header_test.TestMakeHeader(methodName='runTest')
Bases:
TestCase- test_all()
- test_ks()
- test_none()
- test_rels()
- class seismicrna.core.tests.header_test.TestParseHeader(methodName='runTest')
Bases:
TestCase- test_clust()
- test_empty()
- test_extra_index_names()
- test_extra_values()
- test_invalid_numeric()
- test_missing_index_names()
- test_missing_values()
- test_nonnumeric()
- test_rel_index()
- test_rel_index_invalid_name()
- test_rel_index_repeated()
- test_rel_index_valid_name()
- test_rel_multiindex()
- test_relclust()
- class seismicrna.core.tests.header_test.TestRelClustHeader(methodName='runTest')
Bases:
TestCase- test_clustered()
- test_clusts()
- test_index()
- test_iter_clust_indexes()
- test_ks()
- test_level_keys()
- test_level_names()
- test_levels()
- test_modified_all()
- test_modified_ks()
- test_modified_ks_empty()
- test_modified_ks_none()
- test_modified_none()
- test_modified_nullified()
- test_modified_rels()
- test_modified_rels_empty()
- test_modified_rels_none()
- test_num_levels()
- test_select_clust()
- test_select_extra()
- test_select_extra_emptystr()
- test_select_extra_none()
- test_select_extra_zero()
- test_select_invalid_clust()
- test_select_invalid_k()
- test_select_invalid_rel()
- test_select_k_clust_empty()
- test_select_k_clust_exist()
- test_select_ks()
- test_select_none()
- test_select_rel()
- test_signature()
- class seismicrna.core.tests.header_test.TestRelHeader(methodName='runTest')
Bases:
TestCase- test_clustered()
- test_clusts()
- test_index()
- test_iter_clust_indexes()
- test_ks()
- test_level_keys()
- test_level_names()
- test_levels()
- test_modified_ks()
- test_modified_none()
- test_modified_rels()
- test_modified_rels_empty()
- test_modified_rels_none()
- test_names()
- test_num_levels()
- test_rels_duplicated()
- test_rels_empty()
- test_rels_normal()
- test_select_extra()
- test_select_extra_zero()
- test_select_invalid()
- test_select_none()
- test_select_one_rels()
- test_select_rel()
- test_select_two_rels()
- test_signature()
- test_size()
- class seismicrna.core.tests.header_test.TestValidateKClust(methodName='runTest')
Bases:
TestCase- test_float_clust()
- test_float_k()
- test_negative_zero()
- test_one_zero_allowed()
- test_positive_positive()
- test_zero()
- test_zero_negative()
- test_zero_one_allowed()
- class seismicrna.core.tests.header_test.TestValidateKs(methodName='runTest')
Bases:
TestCase- test_duplicated()
- test_empty()
- test_valid()
- test_zero()
- class seismicrna.core.tests.logs_test.TestBeginEnd(methodName='runTest')
Bases:
TestCase- test_begin_with_format_args()
- test_ended_skipped_on_exception()
- test_failed_with_format_args()
- test_logs_began_and_ended()
- class seismicrna.core.tests.logs_test.TestDepth(methodName='runTest')
Bases:
TestCase- test_begin_pushes_and_restores()
- test_context_restored_on_exception()
- test_reconfigure_inside_begin_does_not_crash()
- test_visible_context_indents_nested_message()
- class seismicrna.core.tests.logs_test.TestEraseConfig(methodName='runTest')
Bases:
TestCase- test_erase_config()
- class seismicrna.core.tests.logs_test.TestFormatBody(methodName='runTest')
Bases:
TestCase- test_depth_indents_message_only()
- test_level_pid_message()
- test_long_message_wrapped_to_terminal_width()
- test_multiline_message_aligned()
- class seismicrna.core.tests.logs_test.TestGetConfig(methodName='runTest')
Bases:
TestCase- test_get_config()
- class seismicrna.core.tests.logs_test.TestLazyFormatting(methodName='runTest')
Bases:
TestCaseTemplate is formatted only when the level is visible.
- test_exception_object()
- test_formats_when_level_visible()
- test_keyword_args()
- test_plain_string_no_args()
- class seismicrna.core.tests.logs_test.TestLevels(methodName='runTest')
Bases:
TestCase- test_levels()
- class seismicrna.core.tests.logs_test.TestLoggerClass(methodName='runTest')
Bases:
TestCase- test_logger_class()
- class seismicrna.core.tests.logs_test.TestLoggingExitOnError(methodName='runTest')
Bases:
TestCase- test_exit_on_error()
- test_no_exit_on_error()
- class seismicrna.core.tests.logs_test.TestRestoreConfig(methodName='runTest')
Bases:
TestCase- test_restore_config_error()
- test_restore_config_no_error()
- class seismicrna.core.tests.logs_test.TestSetConfig(methodName='runTest')
Bases:
TestCase- test_defaults()
- test_exit_on_error()
- test_log_file_same_verbosity()
File records at the same verbosity as the console.
- test_log_file_timestamp_prefix()
File lines carry a timestamp prefix; body matches console body.
- test_no_log_color()
- test_verbosity()
- class seismicrna.core.tests.path_test.TestAddBranch(methodName='runTest')
Bases:
TestCase- test_add_branches()
- class seismicrna.core.tests.path_test.TestBranchesField(methodName='runTest')
Bases:
TestCase- test_branches_build()
- test_branches_parse()
- test_branches_validate()
- class seismicrna.core.tests.path_test.TestCmdSeg(methodName='runTest')
Bases:
TestCase- test_cmdseg_build_branches_dict()
- test_cmdseg_build_branches_list()
- test_cmdseg_parse()
- class seismicrna.core.tests.path_test.TestGetSeismicRNASourceDir(methodName='runTest')
Bases:
TestCase- test_get_seismicrna_source_dir()
- class seismicrna.core.tests.path_test.TestSymlinkIfNeeded(*args, **kwargs)
Bases:
TestCase- setUp()
Hook method for setting up the test fixture before exercising it.
- tearDown()
Hook method for deconstructing the test fixture after testing it.
- test_link_not_symlink()
- test_link_valid()
- test_link_wrong_symlink()
- test_target_not_exist()
- class seismicrna.core.tests.path_test.TestValidateBranches(methodName='runTest')
Bases:
TestCase- test_validate_branches()
- test_validate_branches_flat()
- class seismicrna.core.tests.progress_test.ProgressStateTestCase(methodName='runTest')
Bases:
TestCaseTest case that leaves the progress bars as it found them.
Progress bars are global to the process, so a test that reconfigures them would otherwise close and disable the progress bar of the test command that is running it. Each test starts with no progress bars configured and ends with the previous configuration (and any bar that it was drawing) back in place.
- enable_bars()
Draw progress bars on a fake terminal, and return that terminal.
- setUp()
Hook method for setting up the test fixture before exercising it.
- tearDown()
Hook method for deconstructing the test fixture after testing it.
- class seismicrna.core.tests.progress_test.Terminal(initial_value='', newline='\n')
Bases:
StringIOStream that claims to be a terminal, as stderr is in a console.
- isatty()
Return whether this is an ‘interactive’ stream.
Return False if it can’t be determined.
- class seismicrna.core.tests.progress_test.TestCloseBars(methodName='runTest')
Bases:
ProgressStateTestCase- test_closes_bars_after_error()
- test_closes_bars_left_open()
- class seismicrna.core.tests.progress_test.TestConsoleStream(methodName='runTest')
Bases:
ProgressStateTestCase- test_buffers_partial_lines()
- test_passthrough_without_bars()
- class seismicrna.core.tests.progress_test.TestFormatDesc(methodName='runTest')
Bases:
TestCase- test_long_label_cut_short()
- test_padded_to_a_fixed_width()
- class seismicrna.core.tests.progress_test.TestLoggingWithBars(methodName='runTest')
Bases:
ProgressStateTestCase- test_log_message_goes_above_the_bar()
- class seismicrna.core.tests.progress_test.TestProgressBar(methodName='runTest')
Bases:
ProgressStateTestCase- test_close_is_idempotent()
- test_counts_are_clamped()
- test_disabled_bar_does_nothing()
- test_finished_bars_stay_and_the_stack_grows_downward()
- test_finished_bars_survive_the_end_of_a_command()
- test_full_block_sends_finished_bars_to_the_log()
- test_nested_bars_close_out_of_order()
- test_nested_tasks_get_their_own_lines()
- test_no_items_numbered_zero()
- test_numbers_count_from_one()
- test_refresh_draws_every_bar()
- test_set_label()
- test_unnamed_task_gets_no_bar()
- test_warning_written_above_the_bar()
- class seismicrna.core.tests.progress_test.TestSetConfig(methodName='runTest')
Bases:
ProgressStateTestCase- test_default_disabled()
- test_disable_low_verbosity()
- test_disable_off_terminal()
- test_enable_on_terminal()
- test_erase_config_leaves_the_bars_on_the_console()
- test_erase_config_removes_hook()
- test_restore_config()
- class seismicrna.core.tests.progress_test.TestWriteConsole(methodName='runTest')
Bases:
ProgressStateTestCase- test_child_process_does_not_draw()
- test_failure_disables_bars()
- test_write_from_other_process()
- test_write_without_bars()
- class seismicrna.core.tests.random_test.TestStochasticRound(methodName='runTest')
Bases:
TestCase- test_float_arrays()
- test_float_arrays_preserve_sum()
- test_int_arrays()
- class seismicrna.core.tests.stats_test.TestCalcBetaMV(methodName='runTest')
Bases:
TestCase- test_scipy_beta()
- class seismicrna.core.tests.stats_test.TestCalcBetaParams(methodName='runTest')
Bases:
TestCase- test_invert()
- class seismicrna.core.tests.stats_test.TestCalcDirichletMV(methodName='runTest')
Bases:
TestCase- test_scipy_dirichlet()
- class seismicrna.core.tests.stats_test.TestCalcDirichletParams(methodName='runTest')
Bases:
TestCase- test_invert()
- class seismicrna.core.tests.stats_test.TestKumaraswamyPDF(methodName='runTest')
Bases:
TestCase- test_auc()
- seismicrna.core.tests.stats_test.rand_dirichlet_alpha(n: int)
Simulate n alpha parameters for a Dirichlet distribution.
- class seismicrna.core.tests.task_test.TestCalcPoolSize(methodName='runTest')
Bases:
TestCase- test_1_proc()
- test_1_task()
- test_multiple()
- class seismicrna.core.tests.task_test.TestDispatchProgress(methodName='runTest')
Bases:
ProgressStateTestCaseTest that progress bars do not change the results of dispatch.
- test_bar_is_finished_afterwards()
- test_same_results_with_and_without_bars()
- class seismicrna.core.tests.task_test.TestIterFinished(methodName='runTest')
Bases:
ProgressStateTestCaseTest the loop that yields finished tasks and redraws the bar.
- test_ordered()
- test_refreshes_while_waiting()
- test_unnamed_task_still_draws_the_bars()
- test_unordered()
- class seismicrna.core.tests.task_test.TestTaskDepth(methodName='runTest')
Bases:
ProgressStateTestCaseTest the logging context of a task in a child process.
This derives from ProgressStateTestCase because pretending to be a child process also configures this process to share its console, which would otherwise stop the test command from drawing its own progress bar.
- test_child_starts_one_level_deeper()
- class seismicrna.core.tests.unbias_test.TestAdjustMinGap(methodName='runTest')
Bases:
TestCase- test_gap_le_zero_le_npos()
- test_npos_le_zero_le_gap()
- test_zero_le_gap_lt_npos()
- test_zero_lt_npos_le_gap()
- class seismicrna.core.tests.unbias_test.TestCalcPClust(methodName='runTest')
Bases:
TestCase- test_p_clust()
- class seismicrna.core.tests.unbias_test.TestCalcPClustGivenEndsNoClose(methodName='runTest')
Bases:
TestCase- test_calc_p_clust_given_ends_noclose()
- class seismicrna.core.tests.unbias_test.TestCalcPClustGivenNoClose(methodName='runTest')
Bases:
TestCase- test_ncls1()
- test_ncls2()
- class seismicrna.core.tests.unbias_test.TestCalcPEnds(methodName='runTest')
Bases:
TestCase- test_invert()
Test the inverse of calc_p_ends_given_clust_noclose.
- class seismicrna.core.tests.unbias_test.TestCalcPEndsGivenClustNoClose(methodName='runTest')
Bases:
TestCase- test_npos0_ncls1()
- test_npos1_ncls0()
- test_npos1_ncls1()
- test_npos2_ncls1()
- class seismicrna.core.tests.unbias_test.TestCalcPEndsGivenNoClose(methodName='runTest')
Bases:
TestCase- test_calc_p_ends_given_noclose()
- class seismicrna.core.tests.unbias_test.TestCalcPEndsObserved(methodName='runTest')
Bases:
TestCase- test_calc_p_ends_given_observed()
- class seismicrna.core.tests.unbias_test.TestCalcPMutGivenSpan(methodName='runTest')
Bases:
TestCase- test_invert()
Test the inverse of calc_p_mut_given_span_noclose.
- class seismicrna.core.tests.unbias_test.TestCalcPMutGivenSpanDropped(methodName='runTest')
Bases:
TestCase- test_clusters()
- test_simulated()
- class seismicrna.core.tests.unbias_test.TestCalcPMutGivenSpanMerged(methodName='runTest')
Bases:
TestCase- assert_not_statistically_significant(p_expect: ndarray, p_result: ndarray, coverage: ndarray, z_max: float = 6.0)
- test_matches_simulated()
- class seismicrna.core.tests.unbias_test.TestCalcPNoClose(methodName='runTest')
Bases:
TestCase- test_p_noclose()
- class seismicrna.core.tests.unbias_test.TestCalcPNoCloseGivenClust(methodName='runTest')
Bases:
TestCase- test_p_noclose_given_clust()
- class seismicrna.core.tests.unbias_test.TestCalcPNoCloseGivenEnds(methodName='runTest')
Bases:
TestCaseTest calc_p_nomut_window and calc_p_noclose_given_ends.
- test_clusters()
- test_length_0()
- test_length_1()
- test_length_2_min_gap_1()
- test_length_3_min_gap_1()
- test_length_3_min_gap_2()
- test_length_4_min_gap_1()
- test_length_4_min_gap_2()
- test_length_4_min_gap_3()
- test_min_gap_0()
- class seismicrna.core.tests.unbias_test.TestCalcPNoCloseGivenEndsAuto(methodName='runTest')
Bases:
TestCase- test_1_dim()
- test_2_dim()
- test_invalid_dim()
- class seismicrna.core.tests.unbias_test.TestCalcParams(methodName='runTest')
Bases:
TestCase- test_infer()
- class seismicrna.core.tests.unbias_test.TestCalcRectangularSum(methodName='runTest')
Bases:
TestCase- static calc_spanning_sum_slow(array: ndarray)
- test_2d()
- test_3d()
- class seismicrna.core.tests.unbias_test.TestCalcRectangularSumWeighted(methodName='runTest')
Bases:
TestCase- static calc_weighted_slow(array: ndarray, weights: ndarray)
- test_3d()
- test_unit_weights()
- class seismicrna.core.tests.unbias_test.TestClip(methodName='runTest')
Bases:
TestCase- test_with_clip()
- test_without_clip()
- class seismicrna.core.tests.unbias_test.TestFindSplitPositions(methodName='runTest')
Bases:
TestCase- test_0()
- test_gap0()
- test_gap1_single_end3()
- test_gap1_single_end5()
- test_gap1_split0_quadruple()
- test_gap1_split1_double()
- test_gap1_split1_single_mid()
- test_gap1_split1_triple()
- test_gap1_split2()
- test_gap2_single_end3()
- test_gap2_single_end5()
- test_gap2_split0()
- test_gap2_split1()
- test_gap3_single_end3()
- test_gap3_single_end5()
- test_gap4_split0()
- test_gap4_split1()
- test_generic_split()
- test_thresh0()
- test_thresh1()
- class seismicrna.core.tests.unbias_test.TestMergeMutationsRightToLeft(methodName='runTest')
Bases:
TestCase- test_bits_to_matrix()
- test_min_gap_0()
- test_min_gaps_0_to_6()
- test_one_column()
- test_zero_columns()
- class seismicrna.core.tests.unbias_test.TestNoCloseMuts(methodName='runTest')
Bases:
TestCase- test_more_muts()
- test_no_muts()
- test_one_mut()
- class seismicrna.core.tests.unbias_test.TestNormalize(methodName='runTest')
Bases:
TestCase- test_sum_positive()
- test_sum_zero()
- class seismicrna.core.tests.unbias_test.TestQuickUnbias(methodName='runTest')
Bases:
TestCaseTest that the quick unbiasing algorithm produces results very similar to the exact algorithm.
- REL_TOL = 0.01
- test_quick_unbias()
- class seismicrna.core.tests.unbias_test.TestSlicePEnds(methodName='runTest')
Bases:
TestCase- test_0x0()
- test_slice_3x3()
- test_slice_5x5()
- class seismicrna.core.tests.unbias_test.TestTriuAllClose(methodName='runTest')
Bases:
TestCase- test_equal()
- test_float_equal()
- test_float_unequal()
- test_tril()
- test_triu()
- class seismicrna.core.tests.unbias_test.TestTriuCumSum(methodName='runTest')
Bases:
TestCase- test_1x1x2()
- test_2x2()
- test_2x2x1()
- test_2x2x2()
- test_3x3()
- test_all_0()
- test_all_1()
- test_explicit_sum()
- class seismicrna.core.tests.unbias_test.TestTriuDiv(methodName='runTest')
Bases:
TestCase- test_1x1()
- test_1x1x1()
- test_2x2()
- test_2x2x2()
- class seismicrna.core.tests.unbias_test.TestTriuDot(methodName='runTest')
Bases:
TestCase- test_1x1()
- test_1x1x1()
- test_2x2()
- test_2x2x2()
- class seismicrna.core.tests.unbias_test.TestTriuMul(methodName='runTest')
Bases:
TestCase- test_1x1()
- test_1x1x1()
- test_2x2()
- test_2x2x2()
- class seismicrna.core.tests.unbias_test.TestTriuNorm(methodName='runTest')
Bases:
TestCase- compare(result: ndarray, expect: ndarray)
- test_0x0()
- test_0x0x1()
- test_1x1()
- test_1x1x1()
- test_1x1x2()
- test_2x2()
- test_2x2_zero()
- test_2x2x1()
- test_2x2x2()
- test_2x2x2_zero()
- test_2x2x2x2()
- test_2x2x2x2_zero()
- class seismicrna.core.tests.unbias_test.TestTriuSum(methodName='runTest')
Bases:
TestCase- test_1x1()
- test_1x1x1()
- test_1x1x2()
- test_2x2()
- test_2x2x1()
- test_2x2x2()
- test_2x2x2x2()
- test_all_zero()
- seismicrna.core.tests.unbias_test.label_no_close_muts(muts: ndarray, min_gap: int)
Return a 1D vector that is True for every row in muts that has no two mutations that are too close, otherwise False.
- seismicrna.core.tests.unbias_test.merge_mutations_right_to_left(muts: ndarray, min_gap: int)
Merge close mutations row by row from right to left.
For each row, scan from the last column to the first. When a True value is encountered, set the next min_gap positions to the left to False, then continue scanning.
- seismicrna.core.tests.unbias_test.no_close_muts(read: ndarray, min_gap: int)
Return True if the read has no two mutations separated by fewer than min_gap non-mutated positions, otherwise False.
- seismicrna.core.tests.unbias_test.simulate_params(n_pos: int, n_cls: int, p_mut_max: float = 1.0)
Return p_mut, p_ends, and p_clust parameters.
- seismicrna.core.tests.unbias_test.simulate_reads(n_reads: int, p_mut: ndarray, p_ends: ndarray, seed: int = 0)
Simulate n_reads reads based on the mutation rates (p_mut) and the distributions of end coordinates (p_ends).
- seismicrna.core.tests.unbias_test.triu_allclose(a: ndarray | float, b: ndarray | float, rtol: float = 0.001, atol: float = 1e-06)
Whether the upper triangles of a and b are all close.
- Parameters:
a (
np.ndarray | float) – Array 1.b (
np.ndarray | float) – Array 2.rtol (
float = 1.0e-3) – Relative tolerance.atol (
float = 1.0e-6) – Absolute tolerance.
- Returns:
Whether all elements of the upper triangles of a and b are close using the function np.allclose.
- Return type:
- seismicrna.core.tests.unbias_test.triu_sum(a: ndarray)
Calculate the sum over the upper triangle(s) of array a.
- Parameters:
a (
np.ndarray) – Array whose upper triangle to sum.- Returns:
Sum of the upper triangle(s), with the same shape as the third and subsequent dimensions of a.
- Return type:
np.ndarray
- class seismicrna.core.tests.validate_test.TestRequireAtLeast(methodName='runTest')
Bases:
TestCase- test_atleast()
- test_atleast_wrong_type_minimum_unnamed()
- test_not_atmost()
- class seismicrna.core.tests.validate_test.TestRequireAtMost(methodName='runTest')
Bases:
TestCase- test_atmost()
- test_atmost_wrong_type_maximum_unnamed()
- test_not_atmost()
- class seismicrna.core.tests.validate_test.TestRequireEqual(methodName='runTest')
Bases:
TestCase- test_custom_not_valueerror()
- test_custom_valueerror()
- test_equal_int()
- test_equal_str()
- test_equal_wrong_type_other_named()
- test_equal_wrong_type_other_unnamed()
- test_equal_wrong_type_value()
- test_not_equal_int_named()
- test_not_equal_int_unnamed()
- test_not_equal_str_named()
- test_not_equal_str_unnamed()
- class seismicrna.core.tests.validate_test.TestRequireIsIn(methodName='runTest')
Bases:
TestCase- test_custom_exception()
- test_custom_not_exception()
- test_isin()
- test_not_isin_named()
- test_not_isin_unnamed()
- class seismicrna.core.tests.validate_test.TestRequireIsInstance(methodName='runTest')
Bases:
TestCase- test_custom_not_valueerror()
- test_custom_typeerror()
- test_is_instance()
- test_is_instances()
- test_not_isinstance()
- test_not_isinstances()
- class seismicrna.core.tests.validate_test.TestRequireIsSubclass(methodName='runTest')
Bases:
TestCase- test_custom_not_valueerror()
- test_custom_valueerror()
- test_is_subclass()
- test_is_subclasses()
- test_not_issubclass()
- test_not_issubclasses()
- class seismicrna.core.tests.version_test.TestConsistentVersion(methodName='runTest')
Bases:
TestCase- test_meson_build()
- class seismicrna.core.tests.version_test.TestFormatVersion(methodName='runTest')
Bases:
TestCase- test_format_default()
- test_format_notag()
- test_format_prtag()
- class seismicrna.core.tests.version_test.TestParseVersion(methodName='runTest')
Bases:
TestCase- test_invalid_1()
- test_invalid_2()
- test_invalid_3()
- test_invalid_4()
- test_invalid_5()
- test_parse_default()
- test_parse_notag()
- test_parse_prtag_letter()
- test_parse_prtag_letters()
- test_parse_prtag_letters_numbers()