Skip to content

Commit

Permalink
switch all rvdss tests from unittest to pytest; basic abbr virus tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nmdefries committed Nov 22, 2024
1 parent c7a4203 commit 8c6b555
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 17 deletions.
6 changes: 2 additions & 4 deletions tests/acquisition/rvdss/test_database.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
"""Unit tests for rvdss/database.py."""

# standard library
import unittest
import pytest

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


class FunctionTests(unittest.TestCase):
"""Tests each function individually."""
class TestDatabase():

def test_syntax(self):
"""This no-op test ensures that syntax is valid."""
Expand Down
6 changes: 2 additions & 4 deletions tests/acquisition/rvdss/test_pull_historic.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
"""Unit tests for rvdss/pull_historic.py."""

# standard library
import unittest
import pytest

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


class FunctionTests(unittest.TestCase):
"""Tests each function individually."""
class TestPullHistoric():

def test_syntax(self):
"""This no-op test ensures that syntax is valid."""
Expand Down
6 changes: 2 additions & 4 deletions tests/acquisition/rvdss/test_run.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
"""Unit tests for rvdss/run.py."""

# standard library
import unittest
import pytest

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


class FunctionTests(unittest.TestCase):
"""Tests each function individually."""
class TestRun():

def test_syntax(self):
"""This no-op test ensures that syntax is valid."""
Expand Down
13 changes: 8 additions & 5 deletions tests/acquisition/rvdss/test_utils.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
"""Unit tests for rvdss/utils.py."""

# standard library
import unittest
import pytest

from delphi.epidata.acquisition.rvdss.utils import abbreviate_virus

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


class FunctionTests(unittest.TestCase):
"""Tests each function individually."""

class TestUtils:
def test_syntax(self):
"""This no-op test ensures that syntax is valid."""
pass

def test_abbreviate_virus(self):
assert abbreviate_virus("influenza") == "flu" # normal case
assert abbreviate_virus("flu") == "flu" # already abbreviated

0 comments on commit 8c6b555

Please sign in to comment.