1
0
mirror of https://github.com/xtacocorex/CHIP_IO synced 2025-07-20 04:43:21 +00:00

updates to the pytest tests to fix the issues with pwm, added 2 new tests that bring in 5 total unit tests. python3 unit tests are passing, this will close #42 and close #47

This commit is contained in:
Robert Wolterman
2017-02-26 21:04:40 -06:00
parent f7bec3f891
commit 29377cf24d
18 changed files with 149 additions and 27 deletions

14
test/test_lradc.py Normal file
View File

@ -0,0 +1,14 @@
import pytest
import CHIP_IO.LRADC as LRADC
class TestLRADC:
def test_scale_factor(self):
assert LRADC.get_scale_factor() == 31.25
def test_sample_rate_values(self):
assert LRADC.get_allowable_sample_rates() == (32.25, 62.5, 125, 250)
def test_set_sample_rate(self):
LRADC.set_sample_rate(32.25)
assert LRADC.get_sample_rate() == 32.25