Skip to content

Commit 19e88dd

Browse files
author
Takashi Matsuo
committed
Added tox config with flake8 and nosetests.
1 parent e6bd547 commit 19e88dd

32 files changed

+248
-428
lines changed

.coveragerc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[run]
2+
include =
3+
datastore/*
4+
localtesting/*
5+
[report]
6+
exclude_lines =
7+
pragma: NO COVER

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
*.pyc
3+
.coverage
4+
.tox
5+
coverage.xml
6+
nosetests.xml

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ cache:
55
directories:
66
- $HOME/gcloud/
77
env:
8-
- PATH=$PATH:$HOME/gcloud/google-cloud-sdk/bin GOOGLE_APPLICATION_CREDENTIALS=$TRAVIS_BUILD_DIR/client_secrets.json #Other environment variables on same line
8+
- PATH=$PATH:$HOME/gcloud/google-cloud-sdk/bin GOOGLE_APPLICATION_CREDENTIALS=$TRAVIS_BUILD_DIR/client_secrets.json PYTHONPATH=${HOME}/gcloud/platform/google_appengine #Other environment variables on same line
99

1010
before_install:
1111
#ENCRYPT YOUR PRIVATE KEY (If you need authentication)
@@ -33,7 +33,7 @@ before_install:
3333
fi
3434

3535
install:
36-
#Add app specific setup here
36+
- pip install tox
3737

3838
script:
39-
#Test and/or deploy your app with gcloud commands here!
39+
- tox

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,26 @@ For more detailed introduction to a product, check the README in the correspondi
88

99
* See [CONTRIBUTING.md](CONTRIBUTING.md)
1010

11+
### How to run the test
12+
13+
To run the tests, please install App Engine Python SDK and tox and run
14+
tox with the environment variable PYTHONPATH to the App Engine Python
15+
SDK.
16+
17+
You can install App Engine Python SDK with
18+
[Google Cloud SDK](https://cloud.google.com/sdk/) with the following
19+
command:
20+
21+
$ gcloud components update gae-python
22+
23+
Here is instructions to run the tests with virtualenv, $GCLOUD is your
24+
Google Cloud SDK installation path.
25+
26+
$ virtualenv -p python2.7 --no-site-packages /some/where
27+
$ source /some/where/bin/activate
28+
$ pip install tox
29+
$ env PYTHONPATH=${GCLOUD}/platform/google_appengine tox
30+
1131
## Licensing
1232

1333
* See [LICENSE](LICENSE)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# dummy app.yaml for nosegae
22

3-
application: ndb-snippets
3+
application: python-docs-samples
44
version: 1
55
api_version: 1
66
runtime: python27

datastore/__init__.py

Whitespace-only changes.

datastore/ndb/CONTRIBUTING.md

Lines changed: 0 additions & 35 deletions
This file was deleted.

datastore/ndb/LICENSE

Lines changed: 0 additions & 202 deletions
This file was deleted.

datastore/ndb/README.md

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,3 @@ appengine-ndb-snippets
33

44
Sample code snippets for NDB.
55

6-
How to run the test
7-
===================
8-
9-
To run the tests, please install App Engine Python SDK and tox and run
10-
tox with the environment variable PYTHONPATH to the App Engine Python SDK.
11-
12-
You can install App Engine Python SDK with [Google Cloud SDK](https://cloud.google.com/sdk/) with the following command:
13-
14-
$ gcloud components update gae-python
15-
16-
Here is instructions to run the tests with virtualenv, $GCLOUD is your
17-
Google Cloud SDK installation path.
18-
19-
$ virtualenv -p python2.7 --no-site-packages .
20-
$ source bin/activate
21-
$ pip install tox
22-
$ env PYTHONPATH=${GCLOUD}/platform/google_appengine tox

datastore/ndb/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)