From 8c73fc6866fdad0bf0fcf61ea15970bf7942485f Mon Sep 17 00:00:00 2001 From: Edward-Jackson-ONS Date: Wed, 21 Aug 2024 12:08:01 +0100 Subject: [PATCH 1/2] tests: tighten scope of test_from_toml_no_dates --- tests/readers/test_creation.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/tests/readers/test_creation.py b/tests/readers/test_creation.py index db67f77..1cb8dd9 100644 --- a/tests/readers/test_creation.py +++ b/tests/readers/test_creation.py @@ -3,7 +3,6 @@ import datetime as dt from unittest import mock -import pytest from hypothesis import HealthCheck, given, provisional, settings from hypothesis import strategies as st @@ -51,7 +50,6 @@ def test_init(reader_class, urls, terms, dates, outdir, prompt): load.assert_called_once_with() -@pytest.mark.skip("Skipping - requires diagnostics re keywords") @given( st.sampled_from((ToyReader, Debates, WrittenAnswers)), ST_OPTIONAL_STRINGS, @@ -86,13 +84,7 @@ def test_from_toml_no_dates(reader_class, path, urls, terms, text): reader = reader_class.from_toml(path) assert isinstance(reader, what) - assert reader.urls == urls - assert reader.terms == terms assert reader.dates == [YESTERDAY] - assert reader.outdir == text - assert reader.prompt == text - assert reader.llm_name == "gemma" - assert loader.return_value["dates"] is None assert loader.call_count == 2 assert loader.call_args_list == [mock.call(path), mock.call()] From b5f08198b844c4681bf103990a6b47da8db90a5b Mon Sep 17 00:00:00 2001 From: Edward-Jackson-ONS Date: Wed, 21 Aug 2024 12:09:43 +0100 Subject: [PATCH 2/2] refactor: minor change to docstring --- tests/readers/base/test_reader.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/readers/base/test_reader.py b/tests/readers/base/test_reader.py index f3b305d..f931371 100644 --- a/tests/readers/base/test_reader.py +++ b/tests/readers/base/test_reader.py @@ -323,10 +323,7 @@ def test_split_text_into_chunks(text, size, overlap): """ Test the text splitter method. - Currently, we do not do any rigorous testing since we are using the - wrong splitter. For details, see: - - https://github.com/datasciencecampus/parli-ai/issues/72 + Currently, we do not do any rigorous testing. Work in progress. """ with warnings.catch_warnings():