From 6562310687801d888c0afbfd1dc90cef4aee9006 Mon Sep 17 00:00:00 2001 From: Redmar van den Berg <RedmarvandenBerg@lumc.nl> Date: Tue, 27 Aug 2019 11:30:00 +0200 Subject: [PATCH] Add real test for site_concordancy --- tests/test_dummy.py | 18 ++++++++++++++---- tox.ini | 3 +-- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/tests/test_dummy.py b/tests/test_dummy.py index 60b9ef7..11b4eaa 100644 --- a/tests/test_dummy.py +++ b/tests/test_dummy.py @@ -1,6 +1,16 @@ -def func(x): - return x + 1 +import pytest +from vtools.evaluate import site_concordancy -def test_answer(): - assert func(41) == 42 +from cyvcf2 import VCF + + +@pytest.fixture +def known(): + bla =VCF('tests/cases/known1.vcf.gz', gts012=True) + return bla + +def test_evaluate(known): + d, disc = site_concordancy(known, known, ["known1"], ["known1"]) + assert d['total_sites'] == 3 + assert not disc \ No newline at end of file diff --git a/tox.ini b/tox.ini index 772d67c..8b42584 100644 --- a/tox.ini +++ b/tox.ini @@ -2,8 +2,7 @@ envlist = py36 [testenv] -deps = - -rrequirements.txt +deps = pytest commands = pytest -- GitLab