Skip to content

Commit b3928d9

Browse files
committed
Monkey patch this thing and call it done
1 parent e7615d5 commit b3928d9

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ install:
2929
# command to run tests
3030
script:
3131
- flake8 . --exclude=.venv,.build,foo --ignore=E501,F403,E402
32-
- nosetests --with-doctest --ignore-files=plotCoverage --exclude=deeptools.correctGCBias deeptools
32+
- nosetests --with-doctest --ignore-files=plotCoverage deeptools
3333
- nosetests deeptools/test/test_plotCoverage.py
3434
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export PATH=`echo $PATH | sed -e 's/\/home\/travis\/miniconda\/bin://'` ; fi
3535
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then /home/travis/build/fidelram/deepTools/foo/bin/planemo lint galaxy/wrapper/ ; fi

deeptools/correctGCBias.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,11 @@ def writeCorrectedSam_worker(chrNameBam, chrNameBit, start, end,
296296
>>> tempFile = writeCorrectedSam_worker(*args, \
297297
... tag_but_not_change_number=True, verbose=False)
298298
>>> from StringIO import StringIO
299+
>>> ostdout = sys.stdout
300+
>>> import tempfile
301+
>>> sys.stdout = tempfile.TemporaryFile()
299302
>>> idx = pysam.index(tempFile)
303+
>>> sys.stdout = ostdout
300304
>>> bam = pysam.Samfile(tempFile)
301305
>>> [dict(r.tags)['YN'] for r in bam.fetch(args[0], 200, 250)]
302306
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1]
@@ -305,7 +309,9 @@ def writeCorrectedSam_worker(chrNameBam, chrNameBit, start, end,
305309
>>> tempFile = \
306310
... writeCorrectedSam_worker(*test.testWriteCorrectedSam_paired(),\
307311
... tag_but_not_change_number=True, verbose=False)
312+
>>> sys.stdout = tempfile.TemporaryFile()
308313
>>> idx = pysam.index(tempFile)
314+
>>> sys.stdout = ostdout
309315
>>> bam = pysam.Samfile(tempFile)
310316
>>> [dict(r.tags)['YN'] for r in bam.fetch('chr2L', 0, 50)]
311317
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]

0 commit comments

Comments
 (0)