Skip to content

Commit d9ce5d1

Browse files
author
Jon Wayne Parrott
committed
Switching the test runner to py.test
This is the first step in moving to py.test. * Created `scripts/run-tests.py` that handles invoking `py.test` for all samples. * Updated `tox.ini` to use `scripts/run-tests.py` for the `{py27,py34}{-all}` environments. * Removed all unneeded `__init__.py` files. The repository is now a loose collection of independent packages instead of being one monster package. * Created `appengine/conftest.py` to do what nosegae used to do in terms of import/dev_appserver magic. Outstanding questions/issues: * Currently pytest arguments are specified in `tox.ini`. Not sure if we want to move those into `run-tests.py` or not. After this is merged, I can look into converting our tests from `unittest` style to `py.test` style, which is generally cleaner.
1 parent 886fa25 commit d9ce5d1

File tree

125 files changed

+299
-230
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

125 files changed

+299
-230
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,5 @@ lib
1616
testing/resources/test-env.sh
1717
testing/resources/service-account.json
1818
secrets.tar
19+
.cache
20+
junit.xml

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,10 @@ before_install:
1919
- openssl aes-256-cbc -k "$secrets_password" -in secrets.tar.enc -out secrets.tar -d
2020
- tar xvf secrets.tar
2121
install:
22-
- pip install tox
22+
- pip install tox coverage
2323
- pip install -e git+https://github.com/GoogleCloudPlatform/python-repo-tools#egg=python-repo-tools
2424
- gcp-python-repo-tools download-appengine-sdk `dirname "${GAE_PYTHONPATH}"`
2525
script:
2626
- source ${TRAVIS_BUILD_DIR}/testing/resources/test-env.sh
2727
- tox
28+
- coverage report

appengine/__init__.py

Whitespace-only changes.

appengine/app_identity/__init__.py

Whitespace-only changes.

appengine/app_identity/signing/__init__.py

Whitespace-only changes.

appengine/app_identity/signing/main_test.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,10 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
import main
1516
from testing import AppEngineTest
1617
import webtest
1718

18-
from . import main
19-
2019

2120
class TestAppIdentityHandler(AppEngineTest):
2221
def setUp(self):

appengine/bigquery/__init__.py

Whitespace-only changes.

appengine/bigquery/main.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14+
1415
# [START all]
1516

1617
"""

appengine/bigquery/main_test.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,11 @@
1515
import re
1616

1717
from apiclient.http import HttpMock
18+
import main
1819
import mock
1920
import testing
2021
import webtest
2122

22-
from . import main
23-
2423

2524
class TestAuthSample(testing.AppEngineTest):
2625

appengine/blobstore/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)