Skip to content

Commit

Permalink
Merge pull request #116 from GoogleCloudPlatform/annotations
Browse files Browse the repository at this point in the history
Annotating slower tests and excluding them from travis.
  • Loading branch information
jerjou committed Sep 24, 2015
2 parents dc48bd1 + 327326b commit 5a1ffb0
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 5 deletions.
2 changes: 2 additions & 0 deletions bigquery/api/export_data_to_cloud_storage_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@
#

"""Tests for export_table_to_gcs."""
from nose.plugins.attrib import attr
from tests import CloudBaseTest

from .export_data_to_cloud_storage import main


@attr('slow')
class TestExportTableToGCS(CloudBaseTest):
dataset_id = 'test_dataset'
table_id = 'test_table'
Expand Down
2 changes: 2 additions & 0 deletions bigquery/api/load_data_from_csv_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@
"""Tests for load_data_from_csv."""
import os

from nose.plugins.attrib import attr
from tests import CloudBaseTest

from .load_data_from_csv import main


@attr('slow')
class TestLoadDataFromCSV(CloudBaseTest):
dataset_id = 'test_dataset'
table_id = 'test_import_table'
Expand Down
2 changes: 2 additions & 0 deletions compute/api/create_instance_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from nose.plugins.attrib import attr
import tests

from .create_instance import main


@attr('slow')
class TestComputeGettingStarted(tests.CloudBaseTest):

def test_main(self):
Expand Down
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ waitress==0.8.10
WebOb==1.4.1
WebTest==2.0.18
Werkzeug==0.10.4
nose-timer
34 changes: 29 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
[tox]
skipsdist = True
envlist = gae, py27, py34, pep8
envlist = pep8, gae, py27, py34

[testenv]
passenv = PYTHONPATH GOOGLE_* GCLOUD_* TEST_* TRAVIS*
basepython = python2.7
deps =
-rrequirements.txt
-rrequirements-dev.txt
coverargs =
commonargs =
--with-timer
--with-coverage
--cover-tests
--cover-branches
Expand All @@ -21,7 +22,7 @@ commands =
nosetests --with-gae \
--gae-app=tests/resources/app.yaml \
--logging-level=INFO \
{[testenv]coverargs} \
{[testenv]commonargs} \
{posargs:appengine}
setenv =
PYTHONPATH={env:GAE_PYTHONPATH:}
Expand All @@ -32,7 +33,8 @@ deps =
commands =
nosetests \
--exclude-dir=appengine \
{[testenv]coverargs} \
-a '!slow' \
{[testenv]commonargs} \
{posargs}

[testenv:py34]
Expand All @@ -42,7 +44,29 @@ deps =
commands =
nosetests \
--exclude-dir=appengine \
{[testenv]coverargs} \
-a '!slow' \
{[testenv]commonargs} \
{posargs}

[testenv:py27-slow]
deps =
{[testenv]deps}
commands =
nosetests \
--exclude-dir=appengine \
-a 'slow' \
{[testenv]commonargs} \
{posargs}

[testenv:py34-slow]
basepython = python3.4
deps =
{[testenv]deps}
commands =
nosetests \
--exclude-dir=appengine \
-a 'slow' \
{[testenv]commonargs} \
{posargs}

[testenv:pep8]
Expand Down

0 comments on commit 5a1ffb0

Please sign in to comment.