code: def test_poll_blocks_with_negative_ms(self):
      for timeout_ms in [None, -1000, -1, -1.0, -0.1, -1e-100]:
          # Create two file descriptors. This will be used to unlock
          # the blocking call to poll.poll inside the thread
          r, w = os.pipe()
          pollster = select.poll()
          pollster.register(r, select.POLLIN)
  
          poll_thread = threading.Thread(
              target=pollster.poll, args=(timeout_ms,)
          )
          poll_thread.start()
          poll_thread.join(timeout=0.1)
          self.assertTrue(poll_thread.is_alive())
  
          # Write to the pipe so pollster.poll unblocks and the thread ends.
          os.write(w, b"spam")
          poll_thread.join()
          self.assertFalse(poll_thread.is_alive())
          os.close(r)
          os.close(w)
  
file_path: cpython/Lib/test/test_poll.py
imports: import os
  import subprocess
  import random
  import select
  import threading
  import time
  import unittest
  from test.support import cpython_only, requires_subprocess, requires_working_socket, requires_resource
  from test.support import threading_helper
  from test.support.os_helper import TESTFN
label_desc: Use image node_id 7 for calling the PollTests obj's underlying member method code with example usage: obj.test_poll_blocks_with_negative_ms() without return types