Skip to content

Commit

Permalink
remove class
Browse files Browse the repository at this point in the history
  • Loading branch information
adraismawur committed Jul 16, 2024
1 parent 3ac3e91 commit 0db25d8
Showing 1 changed file with 59 additions and 54 deletions.
113 changes: 59 additions & 54 deletions tests/unit/genomics/test_runbigscape.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,76 +3,81 @@
from .. import DATA_DIR


class TestRunBigscape:
def test_run_bigscape_v1(self, tmp_path):
result = bigscape.run_bigscape(
antismash_path=DATA_DIR,
output_path=tmp_path,
extra_params="--help",
version=1,
)
def test_run_bigscape_v1(tmp_path):
result = bigscape.run_bigscape(
antismash_path=DATA_DIR,
output_path=tmp_path,
extra_params="--help",
version=1,
)

assert result is True


def test_run_bigscape_v2(tmp_path):
result = bigscape.run_bigscape(
antismash_path=DATA_DIR,
output_path=tmp_path,
extra_params="--help",
version=2,
)

assert result is True

assert result is True

def test_run_bigscape_v2(self, tmp_path):
result = bigscape.run_bigscape(
def test_run_bigscape_small_dataset_v1(tmp_path):
result = bigscape.run_bigscape(
antismash_path=DATA_DIR / "bigscape/minimal_dataset",
output_path=tmp_path,
extra_params="",
version=1,
)

assert result is True


def test_run_bigscape_small_dataset_v2(tmp_path):
result = bigscape.run_bigscape(
antismash_path=DATA_DIR / "bigscape/minimal_dataset",
output_path=tmp_path,
extra_params="",
version=2,
)

assert result is True


def test_run_bigscape_wrong_version(tmp_path):
with pytest.raises(ValueError) as e:
bigscape.run_bigscape(
antismash_path=DATA_DIR,
output_path=tmp_path,
extra_params="--help",
version=2,
version=3,
)

assert result is True
assert "version" in e.value.args[0]

def test_run_bigscape_small_dataset_v1(self, tmp_path):
result = bigscape.run_bigscape(
antismash_path=DATA_DIR / "bigscape/minimal_dataset",

def test_input_path_not_exist_v1(tmp_path):
with pytest.raises(FileNotFoundError) as e:
bigscape.run_bigscape(
antismash_path=tmp_path / "not_exist",
output_path=tmp_path,
extra_params="",
version=1,
)

assert result is True
assert "antismash_path" in e.value.args[0]


def test_run_bigscape_small_dataset_v2(self, tmp_path):
result = bigscape.run_bigscape(
antismash_path=DATA_DIR / "bigscape/minimal_dataset",
def test_input_path_not_exist_v2(tmp_path):
with pytest.raises(FileNotFoundError) as e:
bigscape.run_bigscape(
antismash_path=tmp_path / "not_exist",
output_path=tmp_path,
extra_params="",
version=2,
)

assert result is True

def test_run_bigscape_wrong_version(self, tmp_path):
with pytest.raises(ValueError) as e:
bigscape.run_bigscape(
antismash_path=DATA_DIR,
output_path=tmp_path,
extra_params="--help",
version=3,
)

assert "version" in e.value.args[0]

def test_input_path_not_exist_v1(self, tmp_path):
with pytest.raises(FileNotFoundError) as e:
bigscape.run_bigscape(
antismash_path=tmp_path / "not_exist",
output_path=tmp_path,
extra_params="",
version=1,
)

assert "antismash_path" in e.value.args[0]

def test_input_path_not_exist_v2(self, tmp_path):
with pytest.raises(FileNotFoundError) as e:
bigscape.run_bigscape(
antismash_path=tmp_path / "not_exist",
output_path=tmp_path,
extra_params="",
version=2,
)

assert "antismash_path" in e.value.args[0]
assert "antismash_path" in e.value.args[0]

0 comments on commit 0db25d8

Please sign in to comment.