Skip to content

Commit 5a1ffb0

Browse files
committed
Merge pull request #116 from GoogleCloudPlatform/annotations
Annotating slower tests and excluding them from travis.
2 parents dc48bd1 + 327326b commit 5a1ffb0

File tree

5 files changed

+36
-5
lines changed

5 files changed

+36
-5
lines changed

bigquery/api/export_data_to_cloud_storage_test.py

+2
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,13 @@
1313
#
1414

1515
"""Tests for export_table_to_gcs."""
16+
from nose.plugins.attrib import attr
1617
from tests import CloudBaseTest
1718

1819
from .export_data_to_cloud_storage import main
1920

2021

22+
@attr('slow')
2123
class TestExportTableToGCS(CloudBaseTest):
2224
dataset_id = 'test_dataset'
2325
table_id = 'test_table'

bigquery/api/load_data_from_csv_test.py

+2
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@
1414
"""Tests for load_data_from_csv."""
1515
import os
1616

17+
from nose.plugins.attrib import attr
1718
from tests import CloudBaseTest
1819

1920
from .load_data_from_csv import main
2021

2122

23+
@attr('slow')
2224
class TestLoadDataFromCSV(CloudBaseTest):
2325
dataset_id = 'test_dataset'
2426
table_id = 'test_import_table'

compute/api/create_instance_test.py

+2
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,13 @@
1111
# See the License for the specific language governing permissions and
1212
# limitations under the License.
1313

14+
from nose.plugins.attrib import attr
1415
import tests
1516

1617
from .create_instance import main
1718

1819

20+
@attr('slow')
1921
class TestComputeGettingStarted(tests.CloudBaseTest):
2022

2123
def test_main(self):

requirements-dev.txt

+1
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ waitress==0.8.10
1515
WebOb==1.4.1
1616
WebTest==2.0.18
1717
Werkzeug==0.10.4
18+
nose-timer

tox.ini

+29-5
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
[tox]
22
skipsdist = True
3-
envlist = gae, py27, py34, pep8
3+
envlist = pep8, gae, py27, py34
44

55
[testenv]
66
passenv = PYTHONPATH GOOGLE_* GCLOUD_* TEST_* TRAVIS*
77
basepython = python2.7
88
deps =
99
-rrequirements.txt
1010
-rrequirements-dev.txt
11-
coverargs =
11+
commonargs =
12+
--with-timer
1213
--with-coverage
1314
--cover-tests
1415
--cover-branches
@@ -21,7 +22,7 @@ commands =
2122
nosetests --with-gae \
2223
--gae-app=tests/resources/app.yaml \
2324
--logging-level=INFO \
24-
{[testenv]coverargs} \
25+
{[testenv]commonargs} \
2526
{posargs:appengine}
2627
setenv =
2728
PYTHONPATH={env:GAE_PYTHONPATH:}
@@ -32,7 +33,8 @@ deps =
3233
commands =
3334
nosetests \
3435
--exclude-dir=appengine \
35-
{[testenv]coverargs} \
36+
-a '!slow' \
37+
{[testenv]commonargs} \
3638
{posargs}
3739

3840
[testenv:py34]
@@ -42,7 +44,29 @@ deps =
4244
commands =
4345
nosetests \
4446
--exclude-dir=appengine \
45-
{[testenv]coverargs} \
47+
-a '!slow' \
48+
{[testenv]commonargs} \
49+
{posargs}
50+
51+
[testenv:py27-slow]
52+
deps =
53+
{[testenv]deps}
54+
commands =
55+
nosetests \
56+
--exclude-dir=appengine \
57+
-a 'slow' \
58+
{[testenv]commonargs} \
59+
{posargs}
60+
61+
[testenv:py34-slow]
62+
basepython = python3.4
63+
deps =
64+
{[testenv]deps}
65+
commands =
66+
nosetests \
67+
--exclude-dir=appengine \
68+
-a 'slow' \
69+
{[testenv]commonargs} \
4670
{posargs}
4771

4872
[testenv:pep8]

0 commit comments

Comments
 (0)