docstr: Test ending cache parent thread ends cache thread.
          
docstr_tok: ["Test","ending","cache","parent","thread","ends","cache","thread","."]
code: def test_cache_parent_thread_ended(self):
      """Test ending cache parent thread ends cache thread."""
      # Firstly make sure we've exited any lingering threads from other
      # tests.
      time.sleep(0.25)
  
      self.assertTrue(_check_n_cache_threads_running() == 0)
  
      def cache_parent_thread():
          cache = interfaces.cache._Cache()
          time.sleep(0.5)
  
      # We give the parent thread the same name as a Cache thread so
      # it is picked up by the cache_threads_running function
      parent_t = threading.Thread(
          target=cache_parent_thread, name="PyFFTWCacheThread"
      )
      parent_t.start()
  
      time.sleep(0.25)
      # Check it's running
      self.assertTrue(_check_n_cache_threads_running() == 2)
  
      parent_t.join()
      time.sleep(0.25)
      # Check both threads have exited properly
      self.assertTrue(_check_n_cache_threads_running() == 0)
  
imports: import copy
  import sys
  from pyfftw import interfaces, builders
  import pyfftw
  import numpy
  import numpy
  import unittest
  from .test_pyfftw_base import run_test_suites, miss
  from .test_pyfftw_numpy_interface import InterfacesNumpyFFTTestFFT
  import threading
  import time
  import os
  import hashlib
label_desc: Use image node_id 1 for calling the CacheTest obj's underlying member method code with example usage: obj.test_cache_parent_thread_ended() without return types