Skip to content
Snippets Groups Projects
Commit 04ff702c authored by nfontrod's avatar nfontrod
Browse files

tests: test directory

parent e470b4f3
No related branches found
No related tags found
No related merge requests found
18 28645943 28646043 1 clip1 -
18 28646043 28646070 1 clip2 -
18 28709190 28709200 2 clip3 -
18 28898040 28898060 3 clip4 +
18 28898060 28898080 3 clip5 +
18 28898080 28898100 3 clip6 +
18 51062273 51062283 8 clip7 +
18 49866521 49866541 8 clip8 +
\ No newline at end of file
#ref start end id score strand
18 28681865 28682388 1_1 0 -
18 28681183 28681432 1_2 0 -
18 28673521 28673606 1_3 0 -
18 28672063 28672263 1_4 0 -
18 28671489 28671530 1_5 0 -
18 28670990 28671110 1_6 0 -
18 28669401 28669557 1_7 0 -
18 28667631 28667776 1_8 0 -
18 28666538 28666705 1_9 0 -
#ref start end id score strand
18 28645943 28682388 1 DSC2 -
18 28709190 28742819 2 DSC1 -
18 28898050 28937394 3 DSG1 +
18 28956739 28994869 4 DSG4 +
13 45766989 45775176 5 KCTD4 -
13 45911001 45915347 6 TPT1 -
18 48918411 49088839 7 AC011260.1 +
18 49866541 51062273 8 DCC +
13 45967450 45992516 9 SLC25A30 -
20 238376 241735 415 DEFB132 +
X 102962271 102983552 10123 GLRA4 -
#!/usr/bin/env python3
# -*- coding: UTF-8 -*-
"""
Description:
"""
import doctest
from pathlib import Path
from typing import List
import unittest
import sys
sys.path.insert(0, str(Path(__file__).parents[1].resolve()))
# recover ignored files
def get_ignored_files() -> List[str]:
"""
Recover ignored python files in gitignore
"""
gitignore = Path(__file__).parents[1] / '.gitignore'
if not gitignore.is_file():
return []
with gitignore.open('r') as f:
files = f.read().splitlines()
return [cfile.replace('.py', '').replace('/', '.')
for cfile in files if cfile.endswith('.py')] + \
["src.db_utils.interactions.features_interactions"]
# Loading every python file in this folder
list_mod = [str(mfile.relative_to(Path(__file__).resolve().parents[1]))
for mfile in
list((Path(__file__).resolve().parents[1] / "src").rglob('*.py'))]
list_mod2 = [m.replace('.py', '').replace('/', '.') for m in list_mod
if '__init__' not in m
and '__main__' not in m
and 'test' not in m]
final_mod = [mod for mod in list_mod2 if mod not in get_ignored_files()]
def load_tests(loader, tests, ignore):
for cmod in final_mod:
tests.addTest(doctest.DocTestSuite(cmod))
return tests
if __name__ == "__main__":
unittest.main()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment