Esempio n. 1
0
def test_water_reading():
    """Test that a proper reading is being returned."""
    pit_depth = configs["pit_depth"]
    value = reading.water_reading()
    assert type(value) == float
    assert pit_depth > value
Esempio n. 2
0
def test_water_reading():
    '''Test that a proper reading is being returned.'''
    pit_depth = configs['pit_depth']
    value = reading.water_reading()
    assert type(value) == float
    assert pit_depth > value
Esempio n. 3
0
#!/usr/bin/python

# Raspi-sump, a sump pump monitoring system.
# Al Audet
# http://www.linuxnorth.org/raspi-sump/
#
# All configuration changes should be done in raspisump.conf
# MIT License -- http://www.linuxnorth.org/raspi-sump/license.html

import time
import ConfigParser
import raspisump.reading as reading

config = ConfigParser.RawConfigParser()
config.read('/home/pi/raspi-sump/raspisump.conf')
reading_interval = config.getint('pit', 'reading_interval')

if reading_interval == 0:
    reading.water_reading()
else:
    while True:
        reading.water_reading()
        time.sleep(reading_interval)
Esempio n. 4
0
def test_water_reading():

    pit_depth = configs['pit_depth']
    value = reading.water_reading()
    assert type(value) == float
    assert pit_depth > value
Esempio n. 5
0
def test_water_reading():

    pit_depth = configs['pit_depth']
    value = reading.water_reading()
    assert type(value) == float
    assert pit_depth > value
Esempio n. 6
0
def test_water_reading():
    '''Test that a proper reading is being returned.'''
    pit_depth = configs['pit_depth']
    value = reading.water_reading()
    assert type(value) == float
    assert pit_depth > value
Esempio n. 7
0
#!/usr/bin/python

# Raspi-sump, a sump pump monitoring system.
# Al Audet
# http://www.linuxnorth.org/raspi-sump/
#
# All configuration changes should be done in raspisump.conf
# MIT License -- http://www.linuxnorth.org/raspi-sump/license.html

import time
import ConfigParser
import raspisump.reading as reading

config = ConfigParser.RawConfigParser()
config.read("/home/pi/raspi-sump/raspisump.conf")
reading_interval = config.getint("pit", "reading_interval")

if reading_interval == 0:
    reading.water_reading()
else:
    while True:
        reading.water_reading()
        time.sleep(reading_interval)