class_docstr: Tests ensuring that when a dataset or samples in a dataset are modified
  all relevant objects are instantly in sync within the same process.
class_docstr_tok: ["Tests","ensuring","that","when","a","dataset","or","samples","in","a","dataset","are","modified","all","relevant","objects","are","instantly","in","sync","within","the","same","process","."]
docstr: Tests that datasets are singletons.
docstr_tok: ["Tests","that","datasets","are","singletons","."]
code: def test_dataset_singleton(self):
      """Tests that datasets are singletons."""
      dataset1 = fo.Dataset("test_dataset")
      dataset2 = fo.load_dataset("test_dataset")
      dataset3 = fo.Dataset()
      self.assertIs(dataset1, dataset2)
      self.assertIsNot(dataset1, dataset3)
  
      with self.assertRaises(ValueError):
          fo.Dataset("test_dataset")
  
      dataset1.delete()
      new_dataset1 = fo.Dataset("test_dataset")
  
      dataset1.__class__._instances["test_dataset"] = dataset1
      new_dataset1 = fo.load_dataset("test_dataset")
      self.assertIsNot(dataset1, new_dataset1)
  
file_path: fiftyone/tests/unittests/synchronization_tests.py
imports: import os
  import unittest
  import fiftyone
  from decorators import drop_datasets
label_desc: Use image node_id 1 for calling the SingleProcessSynchronizationTests obj's underlying member method code with example usage: obj.test_dataset_singleton() without return types