File: synth_test_base.py

package info (click to toggle)
python-gffutils 0.13-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 10,164 kB
  • sloc: python: 5,557; makefile: 62; sh: 13
file content (17 lines) | stat: -rw-r--r-- 533 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
from unittest import TestCase
import gffutils

synthetic_path = gffutils.example_filename("synthetic.gff3")
num_synthetic_features = 18
num_synthetic_overlap = 13


class TestWithSynthDB(TestCase):
    def setUp(self):
        self.db = gffutils.create_db(
            synthetic_path, ":memory:", merge_strategy="create_unique"
        )  # type: gffutils.FeatureDB
        self.assertEqual(num_synthetic_features, self.db.count_features_of_type())

    def _dump_db(self):
        return "\n".join(map(str, self.db.all_features()))