Skip to content

Commit

Permalink
Merge pull request #743 from hugovk/pyroma
Browse files Browse the repository at this point in the history
Test to ensure Pyroma is a 10/10 Mascarpone
  • Loading branch information
aclark4life committed Jun 28, 2014
2 parents acfeeaa + d5bb962 commit 1d7b362
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
33 changes: 33 additions & 0 deletions Tests/test_pyroma.py
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 1d7b362

Please sign in to comment.