From c11b1a436e793fe1e169f626a90a3896d671f908 Mon Sep 17 00:00:00 2001 From: Dazhong Xia Date: Thu, 2 Nov 2023 15:16:38 -0400 Subject: [PATCH] Switch regex strategy to sampling strategy to improve performance (#2998) * Switch regex strategy to sampling strategy to improve performance * Increase deadline --- test/unit/io_managers_test.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/unit/io_managers_test.py b/test/unit/io_managers_test.py index a4ba43efc2..89d8a80988 100644 --- a/test/unit/io_managers_test.py +++ b/test/unit/io_managers_test.py @@ -354,7 +354,7 @@ def test_ferc_xbrl_sqlite_io_manager_dedupes(mocker, tmp_path): example_schema = pandera.DataFrameSchema( { "entity_id": pandera.Column( - str, pandera.Check.str_matches(r"[0-9a-zA-Z]+"), nullable=False + str, pandera.Check.isin("C0123456789"), nullable=False ), "date": pandera.Column("datetime64[ns]", nullable=False), "utility_type": pandera.Column( @@ -365,11 +365,12 @@ def test_ferc_xbrl_sqlite_io_manager_dedupes(mocker, tmp_path): "publication_time": pandera.Column("datetime64[ns]", nullable=False), "int_factoid": pandera.Column(int), "float_factoid": pandera.Column(float), - "str_factoid": pandera.Column("str"), + "str_factoid": pandera.Column(str), } ) +@hypothesis.settings(print_blob=True, deadline=400) @hypothesis.given(example_schema.strategy(size=3)) def test_filter_for_freshest_data(df): # XBRL context is the identifying metadata for reported values