Skip to content

Commit 1d7b362

Browse files
committed
Merge pull request #743 from hugovk/pyroma
Test to ensure Pyroma is a 10/10 Mascarpone
2 parents acfeeaa + d5bb962 commit 1d7b362

File tree

2 files changed

+34
-1
lines changed

2 files changed

+34
-1
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ python:
1616
install:
1717
- "sudo apt-get -qq install libfreetype6-dev liblcms2-dev python-qt4 ghostscript libffi-dev cmake"
1818
- "pip install cffi"
19-
- "pip install coveralls nose"
19+
- "pip install coveralls nose pyroma"
2020
- if [ "$TRAVIS_PYTHON_VERSION" == "2.6" ]; then pip install unittest2; fi
2121

2222
# webp

Tests/test_pyroma.py

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import unittest
2+
3+
try:
4+
import pyroma
5+
except ImportError:
6+
# Skip via setUp()
7+
pass
8+
9+
10+
class TestPyroma(unittest.TestCase):
11+
12+
def setUp(self):
13+
try:
14+
import pyroma
15+
except ImportError:
16+
self.skipTest("ImportError")
17+
18+
def test_pyroma(self):
19+
# Arrange
20+
data = pyroma.projectdata.get_data(".")
21+
22+
# Act
23+
rating = pyroma.ratings.rate(data)
24+
25+
# Assert
26+
# Should have a perfect score
27+
self.assertEqual(rating, (10, []))
28+
29+
30+
if __name__ == '__main__':
31+
unittest.main()
32+
33+
# End of file

0 commit comments

Comments
 (0)