Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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