Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test__is_genome_dir():
# dir contains a fasta
assert genomepy.functions._is_genome_dir("tests/data")
# dir does not contain a fasta
assert not genomepy.functions._is_genome_dir("tests/genome")
def test_track_type():
tracks = [
(("chr1:10-20", "chr2:10-20"), "interval"),
(["chr1:10-20", "chr2:10-20"], "interval"),
("tests/data/regions.txt", "interval"),
("tests/data/regions.bed", "bed"),
]
for track, track_type in tracks:
result = genomepy.functions.get_track_type(track)
assert result == track_type
def test_track_type():
tracks = [
(("chr1:10-20", "chr2:10-20"), "interval"),
(["chr1:10-20", "chr2:10-20"], "interval"),
("tests/data/regions.txt", "interval"),
("tests/data/regions.bed", "bed"),
]
for track, track_type in tracks:
result = genomepy.functions.get_track_type(track)
assert result == track_type
def test_manage_config():
# will give a NameError if the config/config dir is missing
genomepy.functions.manage_config("file")
genomepy.functions.manage_config("show")
def test_basic():
cfg = genomepy.functions.config
print(cfg)
assert 3 == len(cfg.keys())
def test_basic():
cfg = genomepy.functions.config
print(cfg)
assert 3 == len(cfg.keys())