Skip to content

Commit

Permalink
Fix F841 F811 E402 E266 in test_helpers and test_dates.py
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenhua0320 committed Jul 5, 2024
1 parent 8e5126b commit acfa786
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
6 changes: 2 additions & 4 deletions tests/test_dates.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
is_before,
is_after,
is_between,
date_to_float,
month_to_int
)

TEST_DATE = date(2019, 6, 15)
Expand All @@ -36,10 +38,6 @@ def test_month_to_str(input, expected):
assert month_to_str_int(input) == expected


import datetime
from regolith.dates import date_to_float, month_to_int


@pytest.mark.parametrize(
"input,expected",
[
Expand Down
4 changes: 1 addition & 3 deletions tests/test_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1334,8 +1334,7 @@ def test_helpers_bad(hmb, make_db):
repo = Path(make_db)
os.chdir(repo)
with pytest.raises(hmb[2]) as excinfo:
actual = main(args=hmb[0])
assert str(excinfo.value) == hmb[1]
assert str(excinfo.value) == hmb[1]


@pytest.mark.parametrize("db_src", db_srcs)
Expand Down Expand Up @@ -1388,7 +1387,6 @@ def test_helper_python(hm, make_db, db_src, make_mongodb, capsys, mocker):
@pytest.mark.parametrize("hm", helper_map_loose)
def test_helper_python_loose(hm, make_db, capsys):
repo = Path(make_db)
testfile = Path(__file__)
os.chdir(repo)

main(args=hm[0])
Expand Down

0 comments on commit acfa786

Please sign in to comment.