From 150e644fbec5fbc6125e1e212a8ecbbb8a360138 Mon Sep 17 00:00:00 2001 From: hugovk Date: Tue, 22 Apr 2014 11:02:37 +0300 Subject: [PATCH 1/4] Add Travis CI --- .travis.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..ae933d2 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,22 @@ +language: python + +python: + - 2.6 + - 2.7 + - 3.2 + - 3.3 + - pypy + +script: + - python pp/test.py + +after_success: + - pip install pep8 pyflakes + - pep8 pp/*.py + - pyflakes pp/*.py + - pep8 *.py + - pyflakes *.py + +matrix: + allow_failures: + - python: pypy From 67ce946c2eef152d801101382dac3f653519ede0 Mon Sep 17 00:00:00 2001 From: hugovk Date: Tue, 22 Apr 2014 11:07:45 +0300 Subject: [PATCH 2/4] Py3 allowed failure. Use future prints in test.py --- .travis.yml | 4 ++-- pp/test.py | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index ae933d2..576a280 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,8 +3,6 @@ language: python python: - 2.6 - 2.7 - - 3.2 - - 3.3 - pypy script: @@ -19,4 +17,6 @@ after_success: matrix: allow_failures: + - python: 3.2 + - python: 3.3 - python: pypy diff --git a/pp/test.py b/pp/test.py index c011a70..dde7e23 100644 --- a/pp/test.py +++ b/pp/test.py @@ -1,13 +1,14 @@ +from __future__ import print_function import pp pp(["hello", "world"]) pp.pprint("stuff") -print pp.pformat("asdf") +print(pp.pformat("asdf")) -print pp.fmt("stuff") +print(pp.fmt("stuff")) -print dir(pp) +print(dir(pp)) -print repr(pp) +print(repr(pp)) From 6d202e24eb7cf90878c2610c058d2b3770146334 Mon Sep 17 00:00:00 2001 From: hugovk Date: Tue, 22 Apr 2014 11:08:54 +0300 Subject: [PATCH 3/4] Also run tests on Py3.2 and 3.3 --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 576a280..2b65487 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,8 @@ language: python python: - 2.6 - 2.7 + - 3.2 + - 3.3 - pypy script: From 547f26e64bcd45cb0b21e10fe3a88516f9bf88a9 Mon Sep 17 00:00:00 2001 From: Hugo Date: Tue, 22 Apr 2014 11:17:10 +0300 Subject: [PATCH 4/4] Add Travis CI build badge [CI skip] --- README.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.rst b/README.rst index 47d05ce..44394fb 100644 --- a/README.rst +++ b/README.rst @@ -1,6 +1,8 @@ ``pprint++``: a drop-in replacement for ``pprint`` that's actually pretty ========================================================================= +.. image:: https://travis-ci.org/hugovk/pprintpp.svg?branch=master :target: https://travis-ci.org/hugovk/pprintpp + Installation ------------