Skip to content

Commit

Permalink
rename gen_chars -> short_ascii_text
Browse files Browse the repository at this point in the history
  • Loading branch information
kaitj committed Sep 15, 2023
1 parent 691ae78 commit 827c6d8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion afids_utils/tests/strategies.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
HUMAN_PROTOCOL_MAP = json.load(json_fpath)["human"]


def gen_chars():
def short_ascii_text():
return st.text(
min_size=2,
max_size=5,
Expand Down
6 changes: 3 additions & 3 deletions afids_utils/tests/test_afids.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def test_invalid_fpath(self):
with pytest.raises(FileNotFoundError, match=".*does not exist"):
AfidSet.load("invalid/fpath.fcsv")

@given(ext=af_st.gen_chars())
@given(ext=af_st.short_ascii_text())
@allow_function_scoped
def test_invalid_ext(self, ext: str):
assume(not ext == "fcsv" or not ext == "json")
Expand Down Expand Up @@ -213,7 +213,7 @@ def test_invalid_label_range(self, valid_file: PathLike[str]):
with pytest.raises(InvalidFileError, match="Unexpected number.*"):
AfidSet.load(out_fcsv_file.name)

@given(label=af_st.valid_labels(), desc=af_st.gen_chars())
@given(label=af_st.valid_labels(), desc=af_st.short_ascii_text())
@allow_function_scoped
def test_invalid_desc(
self,
Expand Down Expand Up @@ -265,7 +265,7 @@ def test_valid_save(self, valid_file: PathLike[str], ext: str):

assert Path(out_fcsv_file.name).exists()

@given(ext=af_st.gen_chars())
@given(ext=af_st.short_ascii_text())
@allow_function_scoped
def test_invalid_ext_save(self, valid_fcsv_file: PathLike[str], ext: str):
assume(not ext == "fcsv" or not ext == "json")
Expand Down
2 changes: 1 addition & 1 deletion afids_utils/tests/test_ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def test_invalid_num_coord(
):
af_fcsv._get_metadata(temp_in_fcsv.readlines())

@given(coord_str=af_st.gen_chars())
@given(coord_str=af_st.short_ascii_text())
@allow_function_scoped
def test_invalid_str_coord(
self, valid_fcsv_file: PathLike[str], coord_str: int
Expand Down

0 comments on commit 827c6d8

Please sign in to comment.