forked from ales-erjavec/OASYS1
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding small unit test + travis integration for OASYS
- Loading branch information
Thibault VALLOIS
authored and
Thibault VALLOIS
committed
Feb 20, 2019
1 parent
f2337f7
commit c555c12
Showing
5 changed files
with
37 additions
and
18 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,12 @@ | ||
dist: xenial | ||
language: python | ||
python: | ||
- "3.4" | ||
# command to install dependencies | ||
install: "source install.sh" | ||
# # command to run tests | ||
script: python setup.py test | ||
- 3.5 | ||
- 3.6 | ||
- 3.7 | ||
|
||
install: | ||
- pip install . | ||
|
||
script: | ||
pytest oasys/tests |
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
Empty file.
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,18 @@ | ||
from unittest.mock import Mock | ||
import pytest | ||
from oasys.application.addons import is_updatable, Available, Installed, Installable | ||
|
||
|
||
@pytest.mark.parametrize('items,expected', [ | ||
(Available(installable=True), False), | ||
(Installed(installable=None, local=Mock()), False), | ||
(Installed(installable=Installable(name='mock_name', | ||
version='2.0.0', | ||
summary='mock_summary', | ||
description='mock_description', | ||
package_url='mock_package_url', | ||
release_urls='mock_release_urls'), | ||
local=Mock(version='1.0.0')), True), | ||
]) | ||
def test_is_updatable(items, expected): | ||
assert is_updatable(items) == expected |
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