Test module: gff_gtf_tools.py

tests.gff_gtf_tools.py

A module containing tests for the gff_gtf_tools module I’m using in gff_gtf_tools.py. These tests use the standard unittest package and extend the unittest.TestCase class.

module_version:1.0
created_on:2013-11-27

gff and gtf tool tests

class tests.gff_gtf_tools.TestGFFGTFTools(methodName='runTest')[source]

Test the class and functions defined in gff_gtf_tools.py.

Each function is tested with existing and non-existent instances of the file or path type that it is designed for. We also test that providing non- string basic python objects produces string representations and doesn’t case a failure.

setUp()[source]

Initialize the framework for testing.

Define and create a new system temporary directory with the tempfile package for use as an existing directory. A range of gff and gtf files with different parameters are created in this directory to test the routines with.

test_annotation()[source]

tests for the annotations class

Test object Expectation
small complex gff file correct annotation object
set_feature arg not string TypeError
set_feature arg not in feature ValueError
types  
set_feature correct args sorting index for just that feature
test_parse_gff_v3()[source]

Test the parsing routine for v3 gff files

Test object Expectation
simple gff file correct wigData object with correct wigTrack objects
gff w. incorrect data IndexError

Table Of Contents

Previous topic

Test Routines

Next topic

Test module: wig_tools.py

This Page