Skip to content

Annotating slower tests and excluding them from travis. #116

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 24, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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