Skip to content

Commit a6d24e5

Browse files
Changed LINGER to SNDBUF
Not sure why linger has changed, maybe its been removed?
1 parent 8b01235 commit a6d24e5

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

tests/test_general_socket_methods.py

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,12 @@
88
from nanomsg import (
99
PAIR,
1010
Socket,
11-
LINGER,
11+
SNDBUF,
1212
SOL_SOCKET
1313
)
1414

1515
SOCKET_ADDRESS = os.environ.get('NANOMSG_PY_TEST_ADDRESS', "inproc://a")
1616

17-
LINGER_DEFAULT_VALUE = 1000
18-
1917

2018
class TestGeneralSocketMethods(unittest.TestCase):
2119
def setUp(self):
@@ -42,19 +40,14 @@ def test_is_open_is_false_when_closed(self):
4240

4341
self.assertFalse(self.socket.is_open())
4442

45-
def test_set_int_option(self):
43+
def test_set_and_get_int_option(self):
4644
expected = 500
4745

48-
self.socket.set_int_option(SOL_SOCKET, LINGER, expected)
46+
self.socket.set_int_option(SOL_SOCKET, SNDBUF, expected)
4947

50-
actual = self.socket.get_int_option(SOL_SOCKET, LINGER)
48+
actual = self.socket.get_int_option(SOL_SOCKET, SNDBUF)
5149
self.assertEqual(expected, actual)
5250

53-
def test_get_int_option(self):
54-
actual = self.socket.get_int_option(SOL_SOCKET, LINGER)
55-
56-
self.assertEqual(LINGER_DEFAULT_VALUE, actual)
57-
5851

5952
if __name__ == '__main__':
6053
unittest.main()

0 commit comments

Comments
 (0)