Skip to content

Commit

Permalink
New sub-package gc3libs.testing to hold utilities for writing unit …
Browse files Browse the repository at this point in the history
…tests.
  • Loading branch information
riccardomurri committed Sep 2, 2016
1 parent 3e056b6 commit a42d057
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 6 deletions.
22 changes: 22 additions & 0 deletions gc3libs/testing/__init__.py
@@ -0,0 +1,22 @@
# __init__.py
# -*- coding: utf-8 -*-
"""
Sub-package of utility function to aid in writing GC3Pie unit tests.
"""
#
# Copyright (C) 2016, University of Zurich.
#
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
File renamed without changes.
2 changes: 1 addition & 1 deletion gc3libs/tests/test_ParallelTaskCollection.py
Expand Up @@ -30,7 +30,7 @@

from nose.tools import raises, assert_equal

from helpers import SimpleParallelTaskCollection, SuccessfulApp, UnsuccessfulApp, temporary_core
from gc3libs.testing.helpers SimpleParallelTaskCollection, SuccessfulApp, UnsuccessfulApp, temporary_core


## tests
Expand Down
2 changes: 1 addition & 1 deletion gc3libs/tests/test_SequentialTaskCollection.py
Expand Up @@ -30,7 +30,7 @@

from nose.tools import raises, assert_equal

from helpers import SimpleSequentialTaskCollection, SuccessfulApp, UnsuccessfulApp, temporary_core
from gc3libs.testing.helpers SimpleSequentialTaskCollection, SuccessfulApp, UnsuccessfulApp, temporary_core


## tests
Expand Down
2 changes: 1 addition & 1 deletion gc3libs/tests/test_Task.py
Expand Up @@ -29,7 +29,7 @@

from nose.tools import raises, assert_equal

from helpers import SuccessfulApp, UnsuccessfulApp, temporary_core
from gc3libs.testing.helpers SuccessfulApp, UnsuccessfulApp, temporary_core


## tests
Expand Down
2 changes: 1 addition & 1 deletion gc3libs/tests/test_core.py
Expand Up @@ -36,7 +36,7 @@ def assert_is_instance(obj, cls):
from gc3libs.core import Core, MatchMaker
from gc3libs.quantity import GB, hours

from helpers import temporary_config
from gc3libs.testing.helpers temporary_config


@raises(gc3libs.exceptions.NoResources)
Expand Down
2 changes: 1 addition & 1 deletion gc3libs/tests/test_engine.py
Expand Up @@ -40,7 +40,7 @@ def assert_is_instance(obj, cls):
from gc3libs.core import Core, Engine, MatchMaker
from gc3libs.quantity import GB, hours

from helpers import SimpleParallelTaskCollection, SimpleSequentialTaskCollection, SuccessfulApp, temporary_config, temporary_engine
from gc3libs.testing.helpers SimpleParallelTaskCollection, SimpleSequentialTaskCollection, SuccessfulApp, temporary_config, temporary_engine


def test_engine_progress(num_jobs=1, transition_graph=None, max_iter=100):
Expand Down
2 changes: 1 addition & 1 deletion gc3libs/tests/test_workflow.py
Expand Up @@ -38,7 +38,7 @@ def assert_is_instance(obj, cls):
from gc3libs import Run
from gc3libs.workflow import SequentialTaskCollection, StagedTaskCollection, StopOnError

from helpers import SuccessfulApp, UnsuccessfulApp, temporary_core
from gc3libs.testing.helpers SuccessfulApp, UnsuccessfulApp, temporary_core


def test_staged_task_collection_progress():
Expand Down

0 comments on commit a42d057

Please sign in to comment.