Skip to content

Commit

Permalink
Updated tests to not conflict with recent module changes
Browse files Browse the repository at this point in the history
  • Loading branch information
aewebb80 committed Aug 3, 2017
1 parent fe4e2bc commit 8d37cb5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion andrew/andrew_tests.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import unittest, filecmp, sys, os
import vcftools
import vcf_calc
import logging

def compare_to_expected(test_output, expected_output):
return filecmp.cmp(test_output, expected_output)
Expand All @@ -18,9 +19,10 @@ def test_produce_vcftools_log (self):

def test_check_vcftools_for_errors (self):
self.assertTrue(vcftools.check_vcftools_for_errors('Log Test:\n1\n2\n3\nRun Time'))
logging.disable(logging.CRITICAL)
with self.assertRaises(Exception) as cm:
vcftools.check_vcftools_for_errors('Log Test:\n1\n2\n3\nError: No Input')
self.assertEqual(cm.exception.code, 'Error: No Input')
self.assertEqual(str(cm.exception), 'Error: No Input')

def test_Fst_window (self):
vcf_calc.run(['example/locus8.vcf.gz', '--calc-statistic', 'windowed-weir-fst', '--pop-file', 'example/Paniscus.txt', '--pop-file', 'example/Troglodytes.txt', '--out', 'out'])
Expand Down

0 comments on commit 8d37cb5

Please sign in to comment.