Пример #1
0
 def test_set_open_file_limit_not_called_coz_upper_bound_check(
         self,
         mock_set_rlimit: mock.Mock,
         mock_get_rlimit: mock.Mock) -> None:
     Proxy.set_open_file_limit(1024)
     mock_get_rlimit.assert_called_with(resource.RLIMIT_NOFILE)
     mock_set_rlimit.assert_not_called()
Пример #2
0
 def test_set_open_file_limit_not_called(
         self,
         mock_set_rlimit: mock.Mock,
         mock_get_rlimit: mock.Mock) -> None:
     Proxy.set_open_file_limit(256)
     mock_get_rlimit.assert_called_with(resource.RLIMIT_NOFILE)
     mock_set_rlimit.assert_not_called()