Merge pull request #743 from hugovk/pyroma

Test to ensure Pyroma is a 10/10 Mascarpone
This commit is contained in:
Alex Clark ☺ 2014-06-28 17:17:50 -04:00
commit 1d7b362baf
2 changed files with 34 additions and 1 deletions

View File

@ -16,7 +16,7 @@ python:
install:
- "sudo apt-get -qq install libfreetype6-dev liblcms2-dev python-qt4 ghostscript libffi-dev cmake"
- "pip install cffi"
- "pip install coveralls nose"
- "pip install coveralls nose pyroma"
- if [ "$TRAVIS_PYTHON_VERSION" == "2.6" ]; then pip install unittest2; fi
# webp

33
Tests/test_pyroma.py Normal file
View File

@ -0,0 +1,33 @@
import unittest
try:
import pyroma
except ImportError:
# Skip via setUp()
pass
class TestPyroma(unittest.TestCase):
def setUp(self):
try:
import pyroma
except ImportError:
self.skipTest("ImportError")
def test_pyroma(self):
# Arrange
data = pyroma.projectdata.get_data(".")
# Act
rating = pyroma.ratings.rate(data)
# Assert
# Should have a perfect score
self.assertEqual(rating, (10, []))
if __name__ == '__main__':
unittest.main()
# End of file