From 02ee18c4109ec79e628314edfccc054ce3d9c7f1 Mon Sep 17 00:00:00 2001 From: Jim Paris Date: Wed, 14 Aug 2019 18:22:55 -0400 Subject: [PATCH] Improve test coverage --- tests/test_client.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test_client.py b/tests/test_client.py index 4e11dc7..6d898a0 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -6,6 +6,7 @@ import nilmdb.client from nilmdb.utils.printf import * from nilmdb.utils import timestamper from nilmdb.client import ClientError, ServerError +from nilmdb.utils.sort import sort_human import datetime_tz from nose.plugins.skip import SkipTest @@ -111,6 +112,9 @@ class TestClient(object): client.stream_create("/newton/zzz/rawnotch2", "uint16_9") client.stream_create("/newton/zzz/rawnotch11", "uint16_9") + # Test sort_human (used by stream_list) + eq_(sort_human(["/s/10", "/s/2"]), ["/s/2", "/s/10"]) + # Verify we got 4 streams in the right order eq_(client.stream_list(), [ ["/newton/prep", "float32_8"], ["/newton/raw", "uint16_6"],