Add test/style suite.

This commit is contained in:
Johan Bloemberg
2016-11-07 19:59:39 +01:00
parent 90eb6fb3fe
commit 4a82066144
6 changed files with 74 additions and 53 deletions

View File

@@ -1,7 +1,7 @@
import argparse
from dsmr_parser.serial import SERIAL_SETTINGS_V2_2, SERIAL_SETTINGS_V4, SerialReader
from dsmr_parser import telegram_specifications
from dsmr_parser.obis_references import P1_MESSAGE_TIMESTAMP
def console():
"""Output DSMR data to console."""
@@ -14,8 +14,6 @@ def console():
args = parser.parse_args()
version = 'V' + args.version.replace('.', '_')
settings = {
'2.2': (SERIAL_SETTINGS_V2_2, telegram_specifications.V2_2),
'4': (SERIAL_SETTINGS_V4, telegram_specifications.V4),
@@ -32,4 +30,3 @@ def console():
if obj:
print(obj.value, obj.unit)
print()