-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test validate_selection; if fail, print logs in CI
- Loading branch information
Showing
3 changed files
with
26 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,27 @@ | ||
"""Test validate_selection function.""" | ||
import sys | ||
|
||
from backend.ss_select import validate_selection | ||
from backend.models import SketchedContent | ||
|
||
def test_hello_world(): | ||
print("Test validate_selection") | ||
#assert 1 == 0 | ||
return None | ||
def test_validate_selection(): | ||
|
||
mol1_molfile = """ | ||
Ketcher 103023 8282D 1 1.00000 0.00000 0 | ||
2 1 0 0 0 0 999 V2000 | ||
4.9167 -5.8333 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 | ||
5.7827 -5.3333 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 | ||
1 2 1 0 0 0 | ||
M END | ||
""" | ||
selection_type = 'variable' | ||
sketched_content = SketchedContent.parse_obj({'mol1_molfile': mol1_molfile}) | ||
mol1_selected_atoms = '1' | ||
mol1_selected_bonds = '' | ||
mol2_selected_atoms = '' | ||
mol2_selected_bonds = '' | ||
|
||
result = validate_selection(selection_type, sketched_content, mol1_selected_atoms, | ||
mol1_selected_bonds, mol2_selected_atoms, mol2_selected_bonds) | ||
|
||
assert result == ([1], [], [0], [], 'False', [], [], [], [], 'False') |