From 74044f3c7985308b4996da3a52f91c5c20a19194 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Mon, 14 Feb 2022 06:56:32 +0300 Subject: Use pytest's "mark" feature to categorise tests Use pytest's `mark` feature to explicitly categorise the tests and run them per category --- tests/unit/computations/test_qtlreaper.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests/unit/computations/test_qtlreaper.py') diff --git a/tests/unit/computations/test_qtlreaper.py b/tests/unit/computations/test_qtlreaper.py index 742d106..607f4a6 100644 --- a/tests/unit/computations/test_qtlreaper.py +++ b/tests/unit/computations/test_qtlreaper.py @@ -1,5 +1,6 @@ """Module contains tests for gn3.computations.qtlreaper""" from unittest import TestCase +import pytest from gn3.computations.qtlreaper import ( parse_reaper_main_results, organise_reaper_main_results, @@ -9,6 +10,7 @@ from tests.unit.sample_test_data import organised_trait_1 class TestQTLReaper(TestCase): """Class for testing qtlreaper interface functions.""" + @pytest.mark.unit_test def test_parse_reaper_main_results(self): """Test that the main results file is parsed correctly.""" self.assertEqual( @@ -67,6 +69,7 @@ class TestQTLReaper(TestCase): } ]) + @pytest.mark.unit_test def test_parse_reaper_permutation_results(self): """Test that the permutations results file is parsed correctly.""" self.assertEqual( @@ -77,6 +80,7 @@ class TestQTLReaper(TestCase): 5.63874, 5.71346, 5.71936, 5.74275, 5.76764, 5.79815, 5.81671, 5.82775, 5.89659, 5.92117, 5.93396, 5.93396, 5.94957]) + @pytest.mark.unit_test def test_organise_reaper_main_results(self): """Check that results are organised correctly.""" self.assertEqual( -- cgit v1.2.3