Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tidy tests #21

Merged
merged 2 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions tests/readers/base/test_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down
8 changes: 0 additions & 8 deletions tests/readers/test_creation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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()]
Expand Down