Skip to content

Commit

Permalink
Merge pull request #163 from moggers87/update-gh-actions
Browse files Browse the repository at this point in the history
Update github actions
  • Loading branch information
moggers87 authored Apr 2, 2023
2 parents a757003 + 746dea7 commit 94f0ed3
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,29 +18,29 @@ jobs:
python-version: ["3.7", "3.8", "3.9", "3.10"]
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install tox
run: pip install "tox<4" tox-gh-actions
- name: Run tox
run: tox
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v3

misc:
runs-on: ubuntu-latest
strategy:
matrix:
tox_env: [lint, isort, docs]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: 3.8
- name: Install tox
Expand Down
6 changes: 3 additions & 3 deletions tests/test_encoding.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ def test_MailBase(self):
for k in m:
assert m[k] == m2[k], "%s: %r != %r" % (k, m[k], m2[k])

assert("To" in m)
assert("Bob" not in m)
self.assertIn("To", m)
self.assertNotIn("Bob", m)
self.assertEqual(m["To"], "testing@localhost")
m["To"] = "somebody@localhost"
self.assertEqual(m["To"], "somebody@localhost")
Expand Down Expand Up @@ -323,7 +323,7 @@ def test_multiple_headers(self):
msg = encoding.MailBase()
msg["To"] = "somedude@localhost"
msg["From"] = "nobody@localhost"
assert("From" in msg)
self.assertIn("From", msg)
self.assertEqual(msg["From"], "nobody@localhost")
msg["From"] = "somebody@localhost"
self.assertEqual(msg["From"], "somebody@localhost")
Expand Down
18 changes: 9 additions & 9 deletions tests/test_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ def test_mail_request(self):

self.assertEqual(msg['From'], "somedude@localhost")

assert("From" in msg)
self.assertIn("From", msg)
del msg["From"]
assert("From" not in msg)
self.assertNotIn("From", msg)

msg["From"] = "nobody@localhost"
assert("From" in msg)
self.assertIn("From", msg)
self.assertEqual(msg["From"], "nobody@localhost")
msg["From"] = "somebody@localhost"
self.assertEqual(msg["From"], "somebody@localhost")
Expand All @@ -43,9 +43,9 @@ def test_mail_request(self):
("To", "nobody@example.com")])

# validate that upper and lower case work for headers
assert("FroM" in msg)
assert("from" in msg)
assert("From" in msg)
self.assertIn("FroM", msg)
self.assertIn("from", msg)
self.assertIn("From", msg)
self.assertEqual(msg['From'], msg['fRom'])
self.assertEqual(msg['From'], msg['from'])
self.assertEqual(msg['from'], msg['fRom'])
Expand Down Expand Up @@ -205,9 +205,9 @@ def test_mail_response_mailing_list_headers(self):
def test_mail_response_headers(self):
msg = self.test_mail_response_plain_text()
# validate that upper and lower case work for headers
assert("FroM" in msg)
assert("from" in msg)
assert("From" in msg)
self.assertIn("FroM", msg)
self.assertIn("from", msg)
self.assertIn("From", msg)
self.assertEqual(msg['From'], msg['fRom'])
self.assertEqual(msg['From'], msg['from'])
self.assertEqual(msg['from'], msg['fRom'])
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ deps =
jinja2

[testenv:docs]
whitelist_externals = make
allowlist_externals = make
changedir = docs
commands = make html
extras = docs
Expand Down

0 comments on commit 94f0ed3

Please sign in to comment.