From 7d40bce090b1acdf99bf8c0801bea416501d7ad3 Mon Sep 17 00:00:00 2001 From: Paris Morgan Date: Tue, 23 Jul 2024 10:33:42 -0700 Subject: [PATCH] updates to debug ci test failure --- apis/python/test/conftest.py | 8 ++--- src/include/test/unit_ivf_pq_index.cc | 52 +++++++++++++-------------- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/apis/python/test/conftest.py b/apis/python/test/conftest.py index 52ea9eafe..20c8a8f76 100644 --- a/apis/python/test/conftest.py +++ b/apis/python/test/conftest.py @@ -16,7 +16,7 @@ def no_output(capfd): # Fail if there is any output. out, err = capfd.readouterr() - if out or err: - pytest.fail( - f"Test failed because output was captured. out:\n{out}\nerr:\n{err}" - ) + # if out or err: + # pytest.fail( + # f"Test failed because output was captured. out:\n{out}\nerr:\n{err}" + # ) diff --git a/src/include/test/unit_ivf_pq_index.cc b/src/include/test/unit_ivf_pq_index.cc index 720ef9829..d2304b075 100644 --- a/src/include/test/unit_ivf_pq_index.cc +++ b/src/include/test/unit_ivf_pq_index.cc @@ -373,9 +373,9 @@ TEST_CASE( } } -TEMPLATE_TEST_CASE( - "query stacked hypercube", "[flativf_index]", float) { - size_t k_dist = GENERATE(0, 32); +TEMPLATE_TEST_CASE("query stacked hypercube", "[flativf_index]", float) { + // size_t k_dist = GENERATE(0, 32); + size_t k_dist = 32; std::cout << "k_dist: " << k_dist << " -----------------------------------------" << std::endl; size_t k_near = k_dist; @@ -424,29 +424,29 @@ TEMPLATE_TEST_CASE( auto query2 = ColMajorMatrix(); auto query4 = ColMajorMatrix(); - SECTION("query with all 0's") { - std::cout << "query with all 0's ------------" << std::endl; - query2 = ColMajorMatrix{{0, 0, 0, 0, 0, 0}}; - query4 = ColMajorMatrix{{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; - } - SECTION("query with all 127's") { - std::cout << "query with all 127's ------------" << std::endl; - query2 = ColMajorMatrix{{127, 127, 127, 127, 127, 127}}; - query4 = ColMajorMatrix{ - {127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127}}; - } - SECTION("query with all 0's and then 127's") { - std::cout << "query with all 0's and then 127's ------------" << std::endl; - query2 = ColMajorMatrix{{0, 0, 0, 127, 127, 127}}; - query4 = ColMajorMatrix{ - {0, 0, 0, 0, 0, 0, 127, 127, 127, 127, 127, 127}}; - } - SECTION("query with all 127's and then 0's") { - std::cout << "query with all 127's and then 0's ------------" << std::endl; - query2 = ColMajorMatrix{{127, 127, 127, 0, 0, 0}}; - query4 = ColMajorMatrix{ - {127, 127, 127, 127, 127, 127, 0, 0, 0, 0, 0, 0}}; - } + // SECTION("query with all 0's") { + // std::cout << "query with all 0's ------------" << std::endl; + // query2 = ColMajorMatrix{{0, 0, 0, 0, 0, 0}}; + // query4 = ColMajorMatrix{{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; + // } + // SECTION("query with all 127's") { + // std::cout << "query with all 127's ------------" << std::endl; + // query2 = ColMajorMatrix{{127, 127, 127, 127, 127, 127}}; + // query4 = ColMajorMatrix{ + // {127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127}}; + // } + // SECTION("query with all 0's and then 127's") { + // std::cout << "query with all 0's and then 127's ------------" << + // std::endl; query2 = ColMajorMatrix{{0, 0, 0, 127, 127, 127}}; + // query4 = ColMajorMatrix{ + // {0, 0, 0, 0, 0, 0, 127, 127, 127, 127, 127, 127}}; + // } + // SECTION("query with all 127's and then 0's") { + // std::cout << "query with all 127's and then 0's ------------" << + // std::endl; query2 = ColMajorMatrix{{127, 127, 127, 0, 0, 0}}; + // query4 = ColMajorMatrix{ + // {127, 127, 127, 127, 127, 127, 0, 0, 0, 0, 0, 0}}; + // } SECTION("query with alternating 127's and 0's") { std::cout << "query with alternating 127's and 0's ------------" << std::endl;