Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update writer unit tests to test call data equality

Samples written by the writer should have the exact same data before and after
they are parsed. Previously this was not tested, since call data equality
testing only checks for the sample name, genotype, and record (and not other
data fields).
  • Loading branch information...
commit 3540bb7feb13e21cb993770966d5d86992d95a44 1 parent 53548b6
Wibowo Arindrarto bow authored
Showing with 10 additions and 0 deletions.
  1. +10 −0 vcf/test/test_vcf.py
10 vcf/test/test_vcf.py
View
@@ -232,6 +232,11 @@ def testWrite(self):
for l, r in zip(records, reader2):
self.assertEquals(l.samples, r.samples)
+ # test for call data equality, since equality on the sample calls
+ # may not always mean their data are all equal
+ for l_call, r_call in zip(l.samples, r.samples):
+ self.assertEqual(l_call.data, r_call.data)
+
class TestBcfToolsOutputWriter(unittest.TestCase):
@@ -256,6 +261,11 @@ def testWrite(self):
for l, r in zip(records, reader2):
self.assertEquals(l.samples, r.samples)
+ # test for call data equality, since equality on the sample calls
+ # may not always mean their data are all equal
+ for l_call, r_call in zip(l.samples, r.samples):
+ self.assertEqual(l_call.data, r_call.data)
+
class TestWriterDictionaryMeta(unittest.TestCase):
Please sign in to comment.
Something went wrong with that request. Please try again.