Browse Source

Improve test coverage

tags/nilmdb-2.0.0
Jim Paris 3 years ago
parent
commit
2d200a86c9
1 changed files with 11 additions and 0 deletions
  1. +11
    -0
      tests/test_client.py

+ 11
- 0
tests/test_client.py View File

@@ -134,8 +134,19 @@ class TestClient(object):
# we create a table.
limit = resource.getrlimit(resource.RLIMIT_FSIZE)
resource.setrlimit(resource.RLIMIT_FSIZE, (1, limit[1]))

# normal
with assert_raises(ServerError) as e:
client.stream_create("/newton/hello", "uint16_6")

# same but with force_traceback == False, to improve coverage
global test_server
test_server.force_traceback = False
with assert_raises(ServerError) as e:
client.stream_create("/newton/world", "uint16_6")
test_server.force_traceback = True

# Reset resource limit
resource.setrlimit(resource.RLIMIT_FSIZE, limit)

client.close()


Loading…
Cancel
Save