From 6aedd380cf7f91b3289b371b47ac93a511c4f21c Mon Sep 17 00:00:00 2001 From: futoase Date: Mon, 7 Oct 2013 12:43:43 +0900 Subject: [PATCH 1/7] Created: Added .travis.yml --- .travis.yml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..9ffdd42 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,6 @@ +language: python +python: + - 2.6 + - 2.7 +script: + - python test_clint.py From 5e7a191957a2965d2b58094cc34d8ac09099867d Mon Sep 17 00:00:00 2001 From: Ashley Hewson Date: Tue, 19 Nov 2013 16:54:53 +0000 Subject: [PATCH 2/7] Update .travis.yml --- .travis.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 9ffdd42..8658828 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,5 +2,10 @@ language: python python: - 2.6 - 2.7 + - 3.2 + - 3.3 + - pypy +install: + - pip install pytest args script: - - python test_clint.py + - py.test From 3077b0f53e5c84c7d7c1d3d30a319219d9542826 Mon Sep 17 00:00:00 2001 From: aph Date: Tue, 19 Nov 2013 19:47:58 +0000 Subject: [PATCH 3/7] fix for py3.x --- clint/textui/colored.py | 1 + clint/textui/prompt.py | 4 ++-- clint/utils.py | 2 +- examples/args.py | 6 ++++-- tox.ini | 2 +- 5 files changed, 9 insertions(+), 6 deletions(-) diff --git a/clint/textui/colored.py b/clint/textui/colored.py index 2c18b75..fd80bbe 100644 --- a/clint/textui/colored.py +++ b/clint/textui/colored.py @@ -17,6 +17,7 @@ PY3 = sys.version_info[0] >= 3 from ..packages import colorama +from ..utils import basestring __all__ = ( 'red', 'green', 'yellow', 'blue', diff --git a/clint/textui/prompt.py b/clint/textui/prompt.py index 7c4bbdd..64d60bf 100644 --- a/clint/textui/prompt.py +++ b/clint/textui/prompt.py @@ -8,7 +8,7 @@ """ -from __future__ import absolute_import +from __future__ import absolute_import, print_function from re import match, I @@ -30,7 +30,7 @@ def yn(prompt, default='y', batch=False): if not batch: input = raw_input(prompt).strip() else: - print prompt + print(prompt) input = '' # If input is empty default choice is assumed diff --git a/clint/utils.py b/clint/utils.py index e84e851..8d391dd 100644 --- a/clint/utils.py +++ b/clint/utils.py @@ -17,7 +17,7 @@ from glob import glob try: - basestring + basestring = basestring except NameError: basestring = str diff --git a/examples/args.py b/examples/args.py index 777aeda..6bee364 100644 --- a/examples/args.py +++ b/examples/args.py @@ -1,6 +1,8 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- +from __future__ import print_function + import sys import os @@ -15,6 +17,6 @@ puts(colored.red('Files detected: ') + str(args.files)) puts(colored.red('NOT Files detected: ') + str(args.not_files)) puts(colored.red('Grouped Arguments: ') + str(dict(args.grouped))) - -print + +print() diff --git a/tox.ini b/tox.ini index 24c96a5..d8ca534 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py26,py27,py3 +envlist = py26,py27,py32,py33 [testenv] commands=py.test --junitxml=junit-{envname}.xml From 5a88ee3a52688a620ffc7c0843a6fb4a8d043b90 Mon Sep 17 00:00:00 2001 From: aph Date: Tue, 19 Nov 2013 20:00:06 +0000 Subject: [PATCH 4/7] let's try coveralls --- .travis.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8658828..71a20c1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,8 @@ python: - 3.3 - pypy install: - - pip install pytest args + - pip install pytest args coveralls pytest-cov script: - - py.test + - py.test --cov clint +after_success: + coveralls From 439de410c0be5ade7c93ce658f94117aa76c8d20 Mon Sep 17 00:00:00 2001 From: Ashley Hewson Date: Tue, 19 Nov 2013 20:21:51 +0000 Subject: [PATCH 5/7] formatting --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 71a20c1..3ae90d6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,4 +10,4 @@ install: script: - py.test --cov clint after_success: - coveralls + - coveralls From fb96edf52f04e81220ddcd65b181519b5cc3c8da Mon Sep 17 00:00:00 2001 From: aph Date: Tue, 19 Nov 2013 20:29:43 +0000 Subject: [PATCH 6/7] badges! --- README.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.rst b/README.rst index f8670a9..5728d59 100644 --- a/README.rst +++ b/README.rst @@ -28,6 +28,8 @@ Run the various executables in examples_ to get a good feel for what Clint offer You'll never want to not use it. +.. image:: https://travis-ci.org/ashleyh/clint.png?branch=master :target: https://travis-ci.org/ashleyh/clint +.. image:: https://coveralls.io/repos/ashleyh/clint/badge.png?branch=master :target: https://coveralls.io/r/ashleyh/clint?branch=master Current Features: From 7be8140d91c74a2a42e6abec30311317e29f0b65 Mon Sep 17 00:00:00 2001 From: Ashley Hewson Date: Tue, 19 Nov 2013 20:32:24 +0000 Subject: [PATCH 7/7] Update README.rst --- README.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 5728d59..9db07fb 100644 --- a/README.rst +++ b/README.rst @@ -28,8 +28,10 @@ Run the various executables in examples_ to get a good feel for what Clint offer You'll never want to not use it. -.. image:: https://travis-ci.org/ashleyh/clint.png?branch=master :target: https://travis-ci.org/ashleyh/clint -.. image:: https://coveralls.io/repos/ashleyh/clint/badge.png?branch=master :target: https://coveralls.io/r/ashleyh/clint?branch=master +.. image:: https://travis-ci.org/ashleyh/clint.png?branch=master + :target: https://travis-ci.org/ashleyh/clint +.. image:: https://coveralls.io/repos/ashleyh/clint/badge.png?branch=master + :target: https://coveralls.io/r/ashleyh/clint?branch=master Current Features: