From 23262508a27b07189b011c0dc4fa72c506ec291b Mon Sep 17 00:00:00 2001 From: diyderot Date: Fri, 27 Nov 2015 16:59:56 +0100 Subject: [PATCH] Travis-ci and Coveralls added .travis.yml fixed .travis.yml fixed Coverage now run test on all the unittest in neubot_runtime Encoding fix --- .gitignore | 1 + .travis.yml | 9 +++++++++ README.md | 2 ++ neubot_runtime/test_utils_path.py | 4 ++-- 4 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 .travis.yml diff --git a/.gitignore b/.gitignore index c9b568f..553dffb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *.pyc *.swp +*.coverage diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..37d3cd7 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,9 @@ +language: python +python: + - "2.6" + - "2.7" + - "3.4" + - "3.5" +install: pip install coveralls unittest2 +script: coverage run -m unittest2 discover neubot_runtime/ +after_success: coveralls diff --git a/README.md b/README.md index 997c7b9..79b48f6 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Neubot runtime +[![Build Status](https://travis-ci.org/neubot/neubot-runtime.svg?branch=master)](https://travis-ci.org/neubot/neubot-runtime) [![Coverage Status](https://coveralls.io/repos/neubot/neubot-runtime/badge.svg?branch=master)](https://coveralls.io/r/neubot/neubot-runtime?branch=master) + Neubot is a piece of software to measure internet performance from the edges developed at the Nexa Center for Internet & Society, a research center at the Dept. of Computer and Control Engineering at Politecnico di Torino. diff --git a/neubot_runtime/test_utils_path.py b/neubot_runtime/test_utils_path.py index f9602a8..6f445e5 100644 --- a/neubot_runtime/test_utils_path.py +++ b/neubot_runtime/test_utils_path.py @@ -107,7 +107,7 @@ def on_visit_called(*args): components = ['bar', 'baz', 'barbar', 'bazbaz'] utils_path.depth_visit('/foo', components, on_visit_called) - self.assertEquals(visit_order, expected) + self.assertEqual(visit_order, expected) def test__7(self): ''' Make sure that depth_visit() correctly flags the leaf node ''' @@ -138,7 +138,7 @@ class TestPossiblyDecode(unittest.TestCase): def test_nonascii_bytes(self): ''' Test possibly_decode() with unicode bytes input ''' self.assertEqual( - utils_path.possibly_decode('cio\xc3\xa8', 'utf-8'), + utils_path.possibly_decode(six.b('cio\xc3\xa8'), 'utf-8'), six.u("cio\xe8") )