Skip to content

Commit

Permalink
Fix F401 F811 E501 E722 issues in test_tools.py
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenhua0320 committed Jul 5, 2024
1 parent 045847c commit b09e398
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions tests/test_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@
import habanero
import pytest
import datetime as dt
import uuid

import copy
import requests
from unittest import mock
import requests_mock

from regolith.runcontrol import DEFAULT_RC
Expand Down Expand Up @@ -208,15 +203,17 @@ def test_get_person_contact(input, expected):
"ackno": "thanks",
"grant": "fwp2",
"month": "jun",
"note": "\\newline\\newline\\noindent Acknowledgement:\\newline\\noindent thanks\\newline\\newline\\noindent ",
"note": "\\newline\\newline\\noindent Acknowledgement:\\newline\\noindent thanks"
"\\newline\\newline\\noindent ",
"year": "2020",
},
{
"_id": "paper2",
"author": ["m1", "palin"],
"ackno": "thanks",
"grant": "fwp2",
"note": "\\newline\\newline\\noindent Acknowledgement:\\newline\\noindent thanks\\newline\\newline\\noindent ",
"note": "\\newline\\newline\\noindent Acknowledgement:\\newline\\noindent thanks"
"\\newline\\newline\\noindent ",
"year": "2020",
},
{
Expand All @@ -225,7 +222,8 @@ def test_get_person_contact(input, expected):
"author": ["m1", "cleese"],
"grant": "fwp, dmref",
"month": "apr",
"note": "\\newline\\newline\\noindent Acknowledgement:\\newline\\noindent thanks\\newline\\newline\\noindent ",
"note": "\\newline\\newline\\noindent Acknowledgement:\\newline\\noindent thanks"
"\\newline\\newline\\noindent ",
"year": "2021",
},
],
Expand Down Expand Up @@ -1751,7 +1749,7 @@ def test_is_fully_appointed(appts, start, end, expected):
),
],
)
def test_get_id_from_name(input, expected):
def test_get_id_from_grants_honors(input, expected):
assert awards_grants_honors(input) == expected


Expand Down Expand Up @@ -2570,7 +2568,7 @@ def test_group_member_employment_start_end(person, grpname, expected):
try:
actual = group_member_employment_start_end(person, grpname)
assert actual == expected
except:
except RuntimeError:
with pytest.raises(RuntimeError) as excinfo:
actual = group_member_employment_start_end(person, grpname)
assert str(excinfo.value) == expected
Expand All @@ -2591,7 +2589,7 @@ def test_remove_duplicate_docs(inp, expected):
try:
actual = remove_duplicate_docs(inp, "dupe_key")
assert actual == expected
except:
except RuntimeError:
with pytest.raises(RuntimeError) as excinfo:
actual = remove_duplicate_docs(inp, "dupe_key")
assert str(excinfo.value) == expected
Expand Down Expand Up @@ -3166,7 +3164,9 @@ def test_create_repo(**kwargs):
actual = create_repo("talk_repo", "gitlab_private_token", rc)
assert (
actual
== "repo 2206_my_talk has been created at https://example.com.\nClone this to your local using (HTTPS):\ngit clone https://example.com:<group/org name>/2206_my_talk.git\nor (SSH):\ngit clone git@example.com:<group/org name>/2206_my_talk.git"
== "repo 2206_my_talk has been created at https://example.com.\nClone this to your local using "
"(HTTPS):\ngit clone https://example.com:<group/org name>/2206_my_talk.git\nor "
"(SSH):\ngit clone git@example.com:<group/org name>/2206_my_talk.git"
)


Expand Down

0 comments on commit b09e398

Please sign in to comment.