def test_mtm_stats_upper_only_False_1(): test_set = generate_test_set(sizeA=143, sizeB=157, num_connections=20400) bch, half = mtm_stats.mtm_stats(test_set) bcf, full = mtm_stats.mtm_stats(test_set, upper_only=False) assert bch == bcf assert 2 * len(half) == len(full) assert half == {k: v for k, v in full.items() if k[0] < k[1]}
def test_get_mtm_with_indices_a_dense_vs_sparse_1(): connections = generate_test_set(sizeA=100, sizeB=10000, num_connections=10000) assert (mtm_stats.mtm_stats(connections, dense_input=False, indices_a=range(10)) == mtm_stats.mtm_stats( connections, dense_input=True, indices_a=range(10)))
def test_mtm_stats_sizeA_1000_sizeB_100000_num_connections_50000(): assert is_naive_same(generate_test_set(sizeA=1000, sizeB=100000, num_connections=50000), print_time=True)
def test_mtm_stats_sizeA_100_sizeB_10000_num_connections_10000(): assert is_naive_same( generate_test_set(sizeA=100, sizeB=10000, num_connections=10000))
def test_mtm_stats_iterator_2(): test_set = generate_test_set(sizeA=143, sizeB=157, num_connections=20400) assert mtm_stats.mtm_stats(test_set) == mtm_stats.mtm_stats_from_iterator( test_set, 10)