From 31780046c210113bd08aebf709f04f83302b24ad Mon Sep 17 00:00:00 2001 From: Alessio Sergi Date: Thu, 21 Feb 2013 17:51:00 +0100 Subject: [PATCH] Fix Travis-CI issue --- .travis.yml | 5 +++-- MANIFEST.in | 1 - glances/tests/__init__.py | 0 glances/{unitest.py => tests/test_glances.py} | 15 ++++++--------- requirements.txt | 1 + setup.py | 1 + 6 files changed, 11 insertions(+), 12 deletions(-) create mode 100644 glances/tests/__init__.py rename glances/{unitest.py => tests/test_glances.py} (97%) mode change 100755 => 100644 create mode 100644 requirements.txt diff --git a/.travis.yml b/.travis.yml index cc7c7a7a..554887f6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,7 @@ python: - "2.6" - "2.7" - "3.2" + - "3.3" install: - - "pip install psutil" -script: cd ./glances ; python ./unitest.py + - pip install -r requirements.txt --use-mirrors +script: python setup.py test diff --git a/MANIFEST.in b/MANIFEST.in index 826d9633..36c36cd4 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,7 +1,6 @@ include README include COPYING include AUTHORS -include ChangeLog include NEWS include screenshot.png recursive-include doc *.png diff --git a/glances/tests/__init__.py b/glances/tests/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/glances/unitest.py b/glances/tests/test_glances.py old mode 100755 new mode 100644 similarity index 97% rename from glances/unitest.py rename to glances/tests/test_glances.py index 4e6621da..a2f2ffca --- a/glances/unitest.py +++ b/glances/tests/test_glances.py @@ -3,11 +3,6 @@ # # Glances unitary test # -# Syntax: -# ./unitest.py -# or -# ./unitest.py -v -# # Copyright (C) 2012 Nicolargo # # Glances is free software; you can redistribute it and/or modify @@ -23,12 +18,14 @@ # You should have received a copy of the GNU Lesser General Public License # along with this program. If not, see . +# import os +# import time +# import signal import unittest import multiprocessing -import os -import signal -import time -import glances + +from glances import glances + class TestGlancesStat(unittest.TestCase): diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000..c02dd913 --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +psutil==0.6.1 diff --git a/setup.py b/setup.py index cb2ee8ee..310c8a08 100755 --- a/setup.py +++ b/setup.py @@ -40,6 +40,7 @@ setup( license="LGPL", keywords="cli curses monitoring system", long_description=open('README').read(), + test_suite="glances.tests", install_requires=['psutil>=0.4.1'], packages=['glances'], extras_require={