Skip to content

Commit

Permalink
mrg from master
Browse files Browse the repository at this point in the history
  • Loading branch information
grooverdan committed Aug 27, 2015
2 parents c2d9167 + 662fbf4 commit 4d4b012
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 3 deletions.
16 changes: 16 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[run]
branch = True
source =
pymysql


[report]
exclude_lines =
pragma: no cover
except ImportError:
if DEBUG:
def __repr__
def __str__
raise NotImplementedError
def __getattr__
raise ValueError
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
*.pyc
*.pyo
__pycache__
.coverage
/dist
/PyMySQL.egg-info
/.tox
Expand Down
6 changes: 5 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ matrix:
# really only need libaio1 for DB builds however libaio-dev is whitelisted for container builds and liaio1 isn't

install:
- pip install -U tox
- pip install -U tox coveralls

before_script:
- ./.travis.initialize.db.sh;
Expand All @@ -65,9 +65,13 @@ before_script:
- mysql -u root -e "create user travis_pymysql2@localhost identified by 'some password'; grant all on test_pymysql2.* to travis_pymysql2@localhost;"
- mysql -e 'select VERSION();'
- rm -f ~/.my.cnf # set in .travis.initialize.db.sh for the above commands - we should be using database.json however
- export COVERALLS_PARALLEL=true

script:
- tox -e $TOX_ENV

after_success:
- coveralls

after_failure:
- cat /tmp/mysql.err
2 changes: 2 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ PyMySQL
.. image:: https://travis-ci.org/PyMySQL/PyMySQL.svg?branch=master
:target: https://travis-ci.org/PyMySQL/PyMySQL

.. image:: https://coveralls.io/repos/PyMySQL/PyMySQL/badge.svg?branch=coveralls&service=github :target: https://coveralls.io/github/PyMySQL/PyMySQL?branch=coveralls

.. contents::

This package contains a pure-Python MySQL client library. The goal of PyMySQL
Expand Down
2 changes: 1 addition & 1 deletion pymysql/connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def _makefile(sock, mode):
MAX_PACKET_LEN = 2**24-1


def dump_packet(data):
def dump_packet(data): # pragma: no cover
def is_ascii(data):
if 65 <= byte2int(data) <= 122:
if isinstance(data, int):
Expand Down
3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
envlist = py26,py27,py33,py34,pypy,pypy3

[testenv]
commands = ./runtests.py
commands = coverage run ./runtests.py
deps = unittest2
coverage

0 comments on commit 4d4b012

Please sign in to comment.