File tree Expand file tree Collapse file tree 2 files changed +34
-1
lines changed
Expand file tree Collapse file tree 2 files changed +34
-1
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ python:
1616install :
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
Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments