-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #145 from Fxe/dev
bumped to version 0.4.0
- Loading branch information
Showing
10 changed files
with
346 additions
and
27 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
|
||
__author__ = "Christopher Henry" | ||
__email__ = "[email protected]" | ||
__version__ = "0.3.3" | ||
__version__ = "0.4.0" | ||
|
||
logger = logging.getLogger(__name__) | ||
|
||
|
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 |
---|---|---|
@@ -0,0 +1,83 @@ | ||
# -*- coding: utf-8 -*- | ||
from modelseedpy.core.msmodel import * | ||
|
||
|
||
def test_get_direction_from_constraints1(): | ||
res = get_direction_from_constraints(0, 1000) | ||
|
||
assert res == ">" | ||
|
||
|
||
def test_get_direction_from_constraints2(): | ||
res = get_direction_from_constraints(-1000, 0) | ||
|
||
assert res == "<" | ||
|
||
|
||
def test_get_direction_from_constraints3(): | ||
res = get_direction_from_constraints(-1000, 1000) | ||
|
||
assert res == "=" | ||
|
||
|
||
def test_get_set_set1(): | ||
res = get_set_set("A") | ||
|
||
assert len(res) == 1 | ||
assert {"A"} in res | ||
|
||
|
||
def test_get_set_set2(): | ||
res = get_set_set("A and B") | ||
|
||
assert len(res) == 1 | ||
assert {"A", "B"} in res | ||
|
||
|
||
def test_get_set_set3(): | ||
res = get_set_set("A or B") | ||
|
||
assert len(res) == 2 | ||
assert {"A"} in res | ||
assert {"B"} in res | ||
|
||
|
||
def test_get_set_set4(): | ||
res = get_set_set("A or B or C") | ||
|
||
assert len(res) == 3 | ||
assert {"A"} in res | ||
assert {"B"} in res | ||
assert {"C"} in res | ||
|
||
|
||
def test_get_set_set5(): | ||
res = get_set_set("A or B and C") | ||
|
||
assert len(res) == 2 | ||
assert {"A"} in res | ||
assert {"B", "C"} in res | ||
|
||
|
||
def test_get_set_set6(): | ||
res = get_set_set("A and B or C") | ||
|
||
assert len(res) == 2 | ||
assert {"A", "B"} in res | ||
assert {"C"} in res | ||
|
||
|
||
def test_get_set_set7(): | ||
res = get_set_set("(A or B) and C") | ||
|
||
assert len(res) == 2 | ||
assert {"A", "C"} in res | ||
assert {"B", "C"} in res | ||
|
||
|
||
def test_get_set_set8(): | ||
res = get_set_set("A and (B or C)") | ||
|
||
assert len(res) == 2 | ||
assert {"A", "B"} in res | ||
assert {"A", "C"} in res |
Oops, something went wrong.