diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 00000000..4c0d37a1 --- /dev/null +++ b/.coveragerc @@ -0,0 +1,8 @@ +[report] +exclude_lines = + pragma: no cover + def __repr__ + raise TypeError + except UnicodeEncodeError + except KeyboardInterrupt + if __name__ == .__main__.: diff --git a/.gitignore b/.gitignore index f6463c30..fc0aba8b 100644 --- a/.gitignore +++ b/.gitignore @@ -53,6 +53,7 @@ support/libsass.pc build/ dist/ docs/_build +.coverage .tox .*.swp *.egg diff --git a/.travis.yml b/.travis.yml index f165301f..28a4a1ec 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,9 +9,11 @@ python: - 3.3 - 3.4 install: -- pip install -e . "Werkzeug >= 0.9" +- pip install -e . "Werkzeug >= 0.9" coverage coveralls script: -- python setup.py test +- coverage run --source sass,sassc,sassutils setup.py test +after_success: +- coveralls notifications: irc: channels: diff --git a/README.rst b/README.rst index 531ab690..d0821c4f 100644 --- a/README.rst +++ b/README.rst @@ -1,6 +1,18 @@ libsass: SASS_ for Python ========================= +.. image:: https://img.shields.io/pypi/v/libsass.svg + :target: https://pypi.python.org/pypi/libsass + :alt: The latest PyPI release + +.. image:: https://travis-ci.org/dahlia/libsass-python.svg?branch=python + :target: https://travis-ci.org/dahlia/libsass-python + :alt: Build Status + +.. image:: https://img.shields.io/coveralls/dahlia/libsass-python.svg + :target: https://coveralls.io/r/dahlia/libsass-python + :alt: Coverage Status + This package provides a simple Python extension module ``sass`` which is binding Libsass_ (written in C/C++ by Hampton Catlin and Aaron Leung). It's very straightforward and there isn't any headache related Python @@ -10,10 +22,6 @@ Need no Ruby nor Node.js. It currently supports CPython 2.6, 2.7, 3.3, 3.4, and PyPy 1.9+! -.. image:: https://travis-ci.org/dahlia/libsass-python.png?branch=python - :target: https://travis-ci.org/dahlia/libsass-python - :alt: Build Status - .. _SASS: http://sass-lang.com/ .. _Libsass: https://github.com/hcatlin/libsass diff --git a/docs/index.rst b/docs/index.rst index 722c351e..ee66b477 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -79,14 +79,25 @@ GitHub (Git repository + issues) https://github.com/dahlia/libsass-python Travis CI - http://travis-ci.org/dahlia/libsass-python + https://travis-ci.org/dahlia/libsass-python - .. image:: https://secure.travis-ci.org/dahlia/libsass-python.png?branch=python + .. image:: https://travis-ci.org/dahlia/libsass-python.svg?branch=python + :target: https://travis-ci.org/dahlia/libsass-python :alt: Build Status - :target: http://travis-ci.org/dahlia/libsass-python + +Coveralls (Test coverage) + https://coveralls.io/r/dahlia/libsass-python + + .. image:: https://img.shields.io/coveralls/dahlia/libsass-python.svg + :target: https://coveralls.io/r/dahlia/libsass-python + :alt: Coverage Status PyPI - http://pypi.python.org/pypi/libsass + https://pypi.python.org/pypi/libsass + + .. image:: https://img.shields.io/pypi/v/libsass.svg + :target: https://pypi.python.org/pypi/libsass + :alt: The latest PyPI release Changelog :doc:`changes` diff --git a/sassc.py b/sassc.py index 7cc06326..89e80641 100755 --- a/sassc.py +++ b/sassc.py @@ -157,7 +157,7 @@ def main(argv=sys.argv, stdout=sys.stdout, stderr=sys.stderr): if source_map_filename: with open(source_map_filename, 'w') as f: f.write(source_map) - if options.watch: + if options.watch: # pragma: no cover # FIXME: we should utilize inotify on Linux, and FSEvents on Mac while True: try: