Skip to content

Commit 211808d

Browse files
committed
Tests, python README, Makefile fix
1 parent 8934d7a commit 211808d

3 files changed

Lines changed: 45 additions & 0 deletions

File tree

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ python-license: library/LICENSE.txt
4242

4343
library/README.rst: README.md
4444
pandoc --from=markdown --to=rst -o library/README.rst README.md
45+
echo "" >> library/README.rst
46+
cat library/CHANGELOG.txt >> library/README.rst
4547

4648
library/LICENSE.txt: LICENSE
4749
cp LICENSE library/LICENSE.txt

library/README.rst

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
Fan Shim
2+
========
3+
4+
|Build Status| |Coverage Status| |PyPi Package| |Python Versions|
5+
6+
Installing
7+
==========
8+
9+
Stable library from PyPi:
10+
11+
- Just run ``sudo pip install fanshim``
12+
13+
Latest/development library from GitHub:
14+
15+
- ``git clone https://github.com/pimoroni/fanshim-python``
16+
- ``cd fanshim-python``
17+
- ``sudo ./install.sh``
18+
19+
.. |Build Status| image:: https://travis-ci.com/pimoroni/fanshim-python.svg?branch=master
20+
:target: https://travis-ci.com/pimoroni/fanshim-python
21+
.. |Coverage Status| image:: https://coveralls.io/repos/github/pimoroni/fanshim-python/badge.svg?branch=master
22+
:target: https://coveralls.io/github/pimoroni/fanshim-python?branch=master
23+
.. |PyPi Package| image:: https://img.shields.io/pypi/v/fanshim.svg
24+
:target: https://pypi.python.org/pypi/fanshim
25+
.. |Python Versions| image:: https://img.shields.io/pypi/pyversions/fanshim.svg
26+
:target: https://pypi.python.org/pypi/fanshim
27+
28+
0.0.1
29+
-----
30+
31+
* Initial Release

library/tests/test_setup.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import mock
2+
import sys
3+
4+
5+
def test_setup():
6+
sys.modules['RPi'] = mock.Mock()
7+
sys.modules['RPi.GPIO'] = mock.Mock()
8+
sys.modules['plasma'] = mock.Mock()
9+
10+
from fanshim import FANShim
11+
fanshim = FANShim()
12+
del fanshim

0 commit comments

Comments
 (0)