Skip to content

Commit 8c6b555

Browse files
committed
switch all rvdss tests from unittest to pytest; basic abbr virus tests
1 parent c7a4203 commit 8c6b555

File tree

4 files changed

+14
-17
lines changed

4 files changed

+14
-17
lines changed

tests/acquisition/rvdss/test_database.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
"""Unit tests for rvdss/database.py."""
22

3-
# standard library
4-
import unittest
3+
import pytest
54

65
# py3tester coverage target
76
__test_target__ = "delphi.epidata.acquisition.rvdss.database"
87

98

10-
class FunctionTests(unittest.TestCase):
11-
"""Tests each function individually."""
9+
class TestDatabase():
1210

1311
def test_syntax(self):
1412
"""This no-op test ensures that syntax is valid."""

tests/acquisition/rvdss/test_pull_historic.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
"""Unit tests for rvdss/pull_historic.py."""
22

3-
# standard library
4-
import unittest
3+
import pytest
54

65
# py3tester coverage target
76
__test_target__ = "delphi.epidata.acquisition.rvdss.pull_historic"
87

98

10-
class FunctionTests(unittest.TestCase):
11-
"""Tests each function individually."""
9+
class TestPullHistoric():
1210

1311
def test_syntax(self):
1412
"""This no-op test ensures that syntax is valid."""

tests/acquisition/rvdss/test_run.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
"""Unit tests for rvdss/run.py."""
22

3-
# standard library
4-
import unittest
3+
import pytest
54

65
# py3tester coverage target
76
__test_target__ = "delphi.epidata.acquisition.rvdss.run"
87

98

10-
class FunctionTests(unittest.TestCase):
11-
"""Tests each function individually."""
9+
class TestRun():
1210

1311
def test_syntax(self):
1412
"""This no-op test ensures that syntax is valid."""
Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
"""Unit tests for rvdss/utils.py."""
22

3-
# standard library
4-
import unittest
3+
import pytest
4+
5+
from delphi.epidata.acquisition.rvdss.utils import abbreviate_virus
56

67
# py3tester coverage target
78
__test_target__ = "delphi.epidata.acquisition.rvdss.utils"
89

910

10-
class FunctionTests(unittest.TestCase):
11-
"""Tests each function individually."""
12-
11+
class TestUtils:
1312
def test_syntax(self):
1413
"""This no-op test ensures that syntax is valid."""
1514
pass
15+
16+
def test_abbreviate_virus(self):
17+
assert abbreviate_virus("influenza") == "flu" # normal case
18+
assert abbreviate_virus("flu") == "flu" # already abbreviated

0 commit comments

Comments
 (0)