File tree Expand file tree Collapse file tree 6 files changed +53
-24
lines changed Expand file tree Collapse file tree 6 files changed +53
-24
lines changed Original file line number Diff line number Diff line change
1
+ sudo : false
2
+ language : python
3
+ python :
4
+ - ' 2.7'
5
+ install :
6
+ - pip install tox
7
+ env :
8
+ - TOX_ENV=py27-test
9
+ - TOX_ENV=py33-test
10
+ - TOX_ENV=py34-test
11
+ script :
12
+ - tox -e $TOX_ENV
13
+ deploy :
14
+ provider : pypi
15
+ user : mattbennett
16
+ password :
17
+ secure : nS/snIn4e/AWu3yrpzDLPXB+wHXXVU0qLdf07ldUxBx3lJ5K4ggqM1o6huP+ny2lZM6Q+jlRaYj0L6Tb/pppC7Pimx+dni9EFHXvLVO5sLD80+qV/AQPf7tbdWY6FWBV8kMGpXPwdnbKRGnQ17nerBJUfvL0dxigGoAqpOgwxppw/qNk0J3ay2AUnKUnWUKUXgATBLH72MSW6/iT84asIV6jOlfmRLpFKiO42emyBmYTo/TwM6lkjLG465gI2oWc/2sVTR6rkq00Yz5AC3Ry/pUZYfg55M3hTgHSQ54qtd/7IlbsP9inYTiZGsYkDaHlKsM1DdXreApVIo7LzRfCblMGrGvQfZm3BVMmmOWGSzM9dqBOXxjVcG9xHoG4/jzxGJ40gXX4cRS0AgkAWak2Q34QKj30FIBeLrZNzpDUmyPrKFBkfLi8CR8pW06m0Kxs3XWoUvP7ajVocbGnQHXQpz4q7FoKmnXhg0u9XyJTdtZAMt/h7aN9Bb2N0Zfasex025dB93Z2qLmwMVYkwQhIxjfw4vCstq9t+q67JKDMP4O6T7ektJ1Qt2TNR2BEr0/V/r5uplH5qyNH8PKL5YV9afyI+f1Dbdk+8wsRBGFJOm+rHg/JLtkzpTjNeAy4VYsYb8R+1rRe9IyBR7ti0mpW22lemhAHUUdaaol7mZm5yTI=
18
+ on :
19
+ tags : true
20
+ repo : Overseas-Student-Living/sqlalchemy-diff
Original file line number Diff line number Diff line change 2
2
3
3
HTMLCOV_DIR ?= htmlcov
4
4
5
- test : flake8 test_lib
5
+ test : flake8 pylint pytest
6
+
7
+ pylint :
8
+ pylint sqlalchemydiff -E
6
9
7
10
flake8 :
8
11
flake8 sqlalchemydiff test
9
12
10
- test_lib :
11
- coverage run --source=sqlalchemydiff -m pytest test $(ARGS )
12
-
13
- coverage-html : test
14
- coverage html -d $(HTMLCOV_DIR )
15
-
16
- coverage-report : test
17
- coverage report -m
18
-
19
- coverage : coverage-html coverage-report test
13
+ pytest :
14
+ coverage run --source=sqlalchemydiff --branch -m pytest test $(ARGS )
15
+ coverage report --show-missing --fail-under=100
Original file line number Diff line number Diff line change @@ -7,26 +7,37 @@ SQLAlchemy Diff
7
7
inspection API.
8
8
9
9
10
+ Documentation
11
+ -------------
12
+
13
+ See `<http://sqlalchemy-diff.readthedocs.org >`_.
14
+
15
+
10
16
Running tests
11
17
-------------
12
18
13
- Makefile targets that can be used to run the tests .
19
+ Tests are written with pytest. Makefile targets to invoke tests are also provided for convenience .
14
20
15
21
Test databases will be created, used during the tests and destroyed afterwards.
16
22
17
- Example of usage :
23
+ Example:
18
24
19
25
.. code-block :: shell
20
26
21
27
$ # using default settings
22
- $ pytest test
23
28
$ make test
24
- $ make coverage
25
29
26
- $ # or overridding the database URI
27
- $ pytest test --test-db-url=mysql+mysqlconnector://root:password@localhost:3306/sqlalchemydiff
30
+ # or
31
+ $ py.test test
32
+
33
+ $ # overridding the database URI
34
+ $ py.test test --test-db-url=mysql+mysqlconnector://root:password@localhost:3306/sqlalchemydiff
35
+
36
+ # or
28
37
$ make test ARGS=" --test-db-url=mysql+mysqlconnector://root:password@localhost:3306/sqlalchemydiff"
29
- $ make coverage ARGS=" --lf -x -vv --test-db-url=mysql+mysqlconnector://root:password@localhost:3306/sqlalchemydiff"
38
+
39
+ # providing other pytest args via Make
40
+ $ make test ARGS=" --lf -x -vv"
30
41
31
42
32
43
License
Original file line number Diff line number Diff line change 29
29
"mock==2.0.0" ,
30
30
"mysql-connector-python==2.0.4" ,
31
31
"pytest==3.0.3" ,
32
+ "pylint==1.5.1" ,
32
33
"flake8==3.0.4" ,
33
34
"coverage==4.2" ,
34
35
],
Original file line number Diff line number Diff line change @@ -12,12 +12,12 @@ def pytest_addoption(parser):
12
12
action = 'store' ,
13
13
dest = 'TEST_DB_URL' ,
14
14
default = (
15
- 'mysql+mysqlconnector://root:password @localhost:3306/'
15
+ 'mysql+mysqlconnector://root:@localhost:3306/'
16
16
'sqlalchemydiff'
17
17
),
18
18
help = (
19
19
'DB url for testing (e.g. '
20
- '"mysql+mysqlconnector://root:password @localhost:3306/'
20
+ '"mysql+mysqlconnector://root:@localhost:3306/'
21
21
'sqlalchemydiff' '")'
22
22
)
23
23
)
Original file line number Diff line number Diff line change 1
1
[tox]
2
- envlist = py27,py33,py34
2
+ envlist = { py27,py33,py34}-test
3
3
skipdist =True
4
- skip_missing_interpreters =True
5
4
6
5
[testenv]
6
+ whitelist_externals = make
7
+
7
8
commands =
8
- pip install -e " .[dev]" --process-dependency-links
9
- py. test
9
+ pip install --editable .[dev]
10
+ make test
You can’t perform that action at this time.
0 commit comments