Merge pull request #350 from taoliu/fix_test_signal_py38_dev
[MACS.git] / test / test_Parser.py
bloba1c5490d3992b3f719e43c607496ee255c59af7f
1 #!/usr/bin/env python
2 # Time-stamp: <2019-12-12 14:42:28 taoliu>
4 import unittest
6 from MACS2.IO.Parser import *
8 class Test_auto_guess ( unittest.TestCase ):
10 def setUp ( self ):
11 self.bedfile = "test/tiny.bed.gz"
12 self.bedpefile = "test/tiny.bedpe.gz"
13 self.samfile = "test/tiny.sam.gz"
14 self.bamfile = "test/tiny.bam"
16 def test_guess_parser_bed ( self ):
17 p = guess_parser( self.bedfile )
18 self.assertTrue( p.is_gzipped() )
19 self.assertTrue( isinstance(p, BEDParser) )
21 def test_guess_parser_sam ( self ):
22 p = guess_parser( self.samfile )
23 self.assertTrue( p.is_gzipped() )
24 self.assertTrue( isinstance(p, SAMParser) )
26 def test_guess_parser_bam ( self ):
27 p = guess_parser( self.bamfile )
28 self.assertTrue( p.is_gzipped() )
29 self.assertTrue( isinstance(p, BAMParser) )