Skip to content

Commit c8d7dde

Browse files
authored
make test coverage 100% (#203)
Signed-off-by: Inada Naoki <[email protected]>
1 parent 905aefd commit c8d7dde

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.coveragerc

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
[run]
44
branch = True
5-
omit = */tests/*
5+
omit =
6+
*/tests/*
7+
fluent/__about__.py
68

79
[report]
810
omit = */tests/*

tests/test_sender.py

+6
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,12 @@ def test_emit_error(self):
142142
self.assertEqual(len(data), 1)
143143
self.assertEqual(data[0][2]["message"], "Can't output to log")
144144

145+
def test_emit_error_no_forward(self):
146+
with self._sender as sender:
147+
sender.forward_packet_error = False
148+
with self.assertRaises(TypeError):
149+
sender.emit("blah", {"a": object()})
150+
145151
def test_emit_after_close(self):
146152
with self._sender as sender:
147153
self.assertTrue(sender.emit("blah", {"a": "123"}))

0 commit comments

Comments
 (0)