openvax/varlens

Failing unit tests

iskandr opened this issue · 2 comments

ERROR: test.test_reads.test_basic

Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/nose/case.py", line 198, in runTest
self.test(_self.arg)
File "/Users/iskander/code/varlens/test/test_reads.py", line 32, in test_basic
"--reads", data_path("CELSR1/bams/bam_0.bam"),
File "/Users/iskander/code/varlens/test/init.py", line 36, in run_and_parse_csv
function(_args)
File "/Users/iskander/code/varlens/varlens/commands/reads.py", line 91, in run
out_csv_writer.writerow(columns.keys())
_csv.Error: sequence expected

ERROR: test.test_reads.test_loci_filtering

Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/nose/case.py", line 198, in runTest
self.test(_self.arg)
File "/Users/iskander/code/varlens/test/test_reads.py", line 56, in test_loci_filtering
"--reads", data_path("CELSR1/bams/bam_5.bam"),
File "/Users/iskander/code/varlens/test/init.py", line 36, in run_and_parse_csv
function(_args)
File "/Users/iskander/code/varlens/varlens/commands/reads.py", line 91, in run
out_csv_writer.writerow(columns.keys())
_csv.Error: sequence expected

ERROR: test.test_reads.test_round_trip

Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/nose/case.py", line 198, in runTest
self.test(*self.arg)
File "/Users/iskander/code/varlens/test/test_reads.py", line 97, in test_round_trip
"--out", out,
File "/Users/iskander/code/varlens/varlens/commands/reads.py", line 119, in run
pysam.sort("-o", args.out, "-T", "varlens_reads", args.out)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pysam/init.py", line 74, in call
self.dispatch, args, catch_stdout=kwargs.get("catch_stdout", True))
File "pysam/csamtools.pyx", line 85, in pysam.csamtools._samtools_dispatch (pysam/csamtools.c:3166)
nose.proxy.UnsupportedOperation: fileno
-------------------- >> begin captured stdout << ---------------------
Sorting.

This should be working on master now. You currently have to run nosetests with the -s option to disable output buffering.

Updated varlens README with this info and filed a ticket with pysam: pysam-developers/pysam#219

Updated master with a fix so the -s argument is no longer required, you can just run nosetests . The pysam ticket has the fix: pysam-developers/pysam#219