aboutsummaryrefslogtreecommitdiff
path: root/tests/unit/test_data_helpers.py
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2022-02-14 06:56:32 +0300
committerFrederick Muriuki Muriithi2022-02-17 06:37:30 +0300
commit74044f3c7985308b4996da3a52f91c5c20a19194 (patch)
treed86714b859b31cbbd1755522f8abd8eed16e321b /tests/unit/test_data_helpers.py
parent67f517aa0f44f55dc691ffd791bf22ef7af0b02c (diff)
downloadgenenetwork3-74044f3c7985308b4996da3a52f91c5c20a19194.tar.gz
Use pytest's "mark" feature to categorise tests
Use pytest's `mark` feature to explicitly categorise the tests and run them per category
Diffstat (limited to 'tests/unit/test_data_helpers.py')
-rw-r--r--tests/unit/test_data_helpers.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/unit/test_data_helpers.py b/tests/unit/test_data_helpers.py
index 88ea469..b6de42e 100644
--- a/tests/unit/test_data_helpers.py
+++ b/tests/unit/test_data_helpers.py
@@ -4,6 +4,8 @@ Test functions in gn3.data_helpers
from unittest import TestCase
+import pytest
+
from gn3.data_helpers import partition_by, partition_all, parse_csv_line
class TestDataHelpers(TestCase):
@@ -11,6 +13,7 @@ class TestDataHelpers(TestCase):
Test functions in gn3.data_helpers
"""
+ @pytest.mark.unit_test
def test_partition_all(self):
"""
Test that `gn3.data_helpers.partition_all` partitions sequences as expected.
@@ -36,6 +39,7 @@ class TestDataHelpers(TestCase):
with self.subTest(n=count, items=items):
self.assertEqual(partition_all(count, items), expected)
+ @pytest.mark.unit_test
def test_parse_csv_line(self):
"""
Test parsing a single line from a CSV file
@@ -60,6 +64,7 @@ class TestDataHelpers(TestCase):
line=line, delimiter=delimiter, quoting=quoting),
expected)
+ @pytest.mark.unit_test
def test_partition_by(self):
"""
Test that `partition_by` groups the data using the given predicate