Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
TaiSakuma committed Jul 6, 2024
1 parent 5ab6c66 commit cc3e023
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
Empty file added tests/stream/output/__init__.py
Empty file.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
from pytest import MonkeyPatch

from atpbar.stream import FD, OutputStream

from .st import st_text
from tests.stream.st import st_text


def st_end() -> st.SearchStrategy[str | None]:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
from hypothesis import strategies as st

from atpbar.stream import OutputStream, Queue, StreamQueue

from .st import st_text
from tests.stream.st import st_text


class StatefulTest:
Expand Down Expand Up @@ -41,7 +40,7 @@ def flush(self) -> None:

@settings(max_examples=200)
@given(data=st.data())
def test_stream(data: st.DataObject) -> None:
def test_stateful(data: st.DataObject) -> None:
test = StatefulTest(data=data)
METHODS = [test.write, test.write_with_newline, test.flush]
methods = data.draw(st.lists(st.sampled_from(METHODS)))
Expand Down

0 comments on commit cc3e023

Please sign in to comment.