File: tfuncs.py

package info (click to toggle)
python-pybedtools 0.9.0-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 16,284 kB
  • sloc: python: 10,014; cpp: 899; makefile: 141; sh: 57
file content (19 lines) | stat: -rw-r--r-- 492 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import pytest
import pybedtools
import os

testdir = os.path.dirname(__file__)
test_tempdir = os.path.join(os.path.abspath(testdir), "tmp")
unwriteable = os.path.join(os.path.abspath(testdir), "unwriteable")


def setup_module():
    if not os.path.exists(test_tempdir):
        os.system("mkdir -p %s" % test_tempdir)
    pybedtools.set_tempdir(test_tempdir)


def teardown_module():
    if os.path.exists(test_tempdir):
        os.system("rm -r %s" % test_tempdir)
    pybedtools.cleanup()