Browse Source

Improve branch coverage for numpyclient

tags/nilmdb-2.0.0
Jim Paris 3 years ago
parent
commit
6645395924
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      tests/test_numpyclient.py

+ 4
- 2
tests/test_numpyclient.py View File

@@ -150,12 +150,14 @@ class TestNumpyClient(object):
client.stream_extract_numpy(
"/newton/prep", structured = False, maxrows = 1000))

# Structured, and specifying layout
# Structured, and specifying layout.
# This also tests the final branch in stream_extract_numpy by specifing
# a value of maxrows that exactly matches how much data we had inserted.
client.stream_create("/test/3", "float32_8")
client.stream_insert_numpy(
path = "/test/3", layout = "float32_8",
data = client.stream_extract_numpy(
"/newton/prep", structured = True, maxrows = 1000))
"/newton/prep", structured = True, maxrows = 14400))

# Structured, specifying wrong layout
client.stream_create("/test/4", "float32_8")


Loading…
Cancel
Save