Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Insoleet committed Jun 7, 2016
1 parent 356dbe1 commit af342e1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion release.sh
Expand Up @@ -4,7 +4,7 @@
current=`grep -P "__version_info__ = \(\'\d+\', \'\d+\', \'\d+(\w*)\'\)" src/sakia/__init__.py | grep -oP "\'\d+\', \'\d+\', \'\d+(\w*)\'"`
echo "Current version: $current"

if [[ $1 =~ ^[0-9]+.[0-9]+.[0-9]+[0-9a-z]+$ ]]; then
if [[ $1 =~ ^[0-9]+.[0-9]+.[0-9]+[0-9a-z]*$ ]]; then
IFS='.' read -r -a array <<< "$1"
sed -i "s/__version_info__\ = ($current)/__version_info__ = ('${array[0]}', '${array[1]}', '${array[2]}')/g" src/sakia/__init__.py
sed -i "s/#define MyAppVerStr .*/#define MyAppVerStr \"$1\"/g" ci/appveyor/sakia.iss
Expand Down
3 changes: 3 additions & 0 deletions src/sakia/tests/unit/core/graph/test_explorer_graph.py
Expand Up @@ -126,6 +126,7 @@ def tearDown(self):
def test_explore_full_from_center(self, app, community):
community.parameters = CoroutineMock(return_value = {'sigValidity': 1000})
community.network.confirmations = Mock(side_effect=lambda n: 4 if 996 else None)
community.nb_members = CoroutineMock(return_value = 3)
app.preferences = {'expert_mode': True}

explorer_graph = ExplorerGraph(app, community)
Expand All @@ -143,6 +144,7 @@ async def exec_test():
def test_explore_full_from_extremity(self, app, community):
community.parameters = CoroutineMock(return_value = {'sigValidity': 1000})
community.network.confirmations = Mock(side_effect=lambda n: 4 if 996 else None)
community.nb_members = CoroutineMock(return_value = 3)
app.preferences = {'expert_mode': True}

explorer_graph = ExplorerGraph(app, community)
Expand All @@ -160,6 +162,7 @@ async def exec_test():
def test_explore_partial(self, app, community):
community.parameters = CoroutineMock(return_value = {'sigValidity': 1000})
community.network.confirmations = Mock(side_effect=lambda n: 4 if 996 else None)
community.nb_members = CoroutineMock(return_value = 3)
app.preferences = {'expert_mode': True}

explorer_graph = ExplorerGraph(app, community)
Expand Down

0 comments on commit af342e1

Please sign in to comment.