-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
79 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
pytest==5.4.3 | ||
cyvcf2==0.30.12 | ||
mongomock==3.18.0 | ||
mongomock | ||
click==7.1.2 | ||
pymongo==3.7.1 | ||
pymongo | ||
numpy==1.21.4 | ||
coloredlogs==14.0 | ||
pyyaml>=5.4.1 | ||
vcftoolbox==1.5 | ||
pip==23.1.2 | ||
setuptools==65.5.1 | ||
mongo_adapter>=0.3.3 | ||
mongo_adapter | ||
ped_parser |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from click.testing import CliRunner | ||
|
||
from loqusdb.commands.cli import cli as base_command | ||
|
||
def test_export_base(real_db_name): | ||
"""Test the base command that exports variants.""" | ||
|
||
runner = CliRunner() | ||
|
||
# WHEN the base command to export cases is run | ||
command = ["--database", real_db_name, "export"] | ||
|
||
## THEN it should return success | ||
result = runner.invoke(base_command, command) | ||
assert result.exit_code == 0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
from click.testing import CliRunner | ||
|
||
from loqusdb.commands.cli import cli as base_command | ||
|
||
def test_identity(real_db_name): | ||
"""Test the SV identity base command.""" | ||
|
||
runner = CliRunner() | ||
|
||
# WHEN the base identity command is run on an empty database | ||
command = ["--database", real_db_name, "identity", "-v", "1_7890024_TGA_GGG"] | ||
|
||
# THEN the command should return success | ||
result = runner.invoke(base_command, command) | ||
assert result.exit_code == 0 | ||
|
||
# AND no variant found message | ||
assert "No hits for variant" in result.output | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from click.testing import CliRunner | ||
|
||
from loqusdb.commands.cli import cli as base_command | ||
|
||
def test_view_cases_base(real_mongo_adapter, real_db_name): | ||
"""Test the base command that returns database cases.""" | ||
|
||
## GIVEN an empty database | ||
assert sum([1 for _ in real_mongo_adapter.cases()]) == 0 | ||
|
||
runner = CliRunner() | ||
|
||
# THEN the case command should return No cases found error | ||
command = ["--database", real_db_name, "cases" ] | ||
result = runner.invoke(base_command, command) | ||
assert result.exit_code == 1 | ||
assert "No cases found in database" in result.output |