code: def test_no_partition_file(self):
      if os.path.isfile(partition_output):
          os.remove(partition_output)
  
      data_param = test_sections
      test_partitioner = ImageSetsPartitioner()
      test_partitioner.initialise(
          data_param,
          new_partition=False,
          data_split_file=partition_output,
      )
      self.assertEqual(
          test_partitioner.get_file_list()[COLUMN_UNIQ_ID].count(), 4
      )
      with self.assertRaisesRegexp(ValueError, ""):
          test_partitioner.get_file_list(TRAIN)
      with self.assertRaisesRegexp(ValueError, ""):
          test_partitioner.get_file_list(VALID)
      with self.assertRaisesRegexp(ValueError, ""):
          test_partitioner.get_file_list(INFER)
  
file_path: NiftyNet/tests/image_sets_partitioner_test.py
imports: from __future__ import absolute_import, print_function
  import os
  import tensorflow
  from niftynet.io.image_sets_partitioner import COLUMN_UNIQ_ID
  from niftynet.io.image_sets_partitioner import ImageSetsPartitioner
  from niftynet.engine.signal import TRAIN, VALID, INFER
  from niftynet.utilities.util_common import ParserNamespace
  from tests.niftynet_testcase import NiftyNetTestCase
label_desc: Use image node_id 1 for calling the ImageSetsPartitionerTest obj's underlying member method code with example usage: obj.test_no_partition_file() without return types