code: def test_exists(self):
      filename = os_helper.TESTFN
      bfilename = os.fsencode(filename)
      self.addCleanup(os_helper.unlink, filename)
  
      self.assertIs(self.pathmodule.exists(filename), False)
      self.assertIs(self.pathmodule.exists(bfilename), False)
  
      create_file(filename)
  
      self.assertIs(self.pathmodule.exists(filename), True)
      self.assertIs(self.pathmodule.exists(bfilename), True)
  
      self.assertIs(self.pathmodule.exists(filename + "\udfff"), False)
      self.assertIs(self.pathmodule.exists(bfilename + b"\xff"), False)
      self.assertIs(self.pathmodule.exists(filename + "\x00"), False)
      self.assertIs(self.pathmodule.exists(bfilename + b"\x00"), False)
  
      if self.pathmodule is not genericpath:
          self.assertIs(self.pathmodule.lexists(filename), True)
          self.assertIs(self.pathmodule.lexists(bfilename), True)
  
          self.assertIs(
              self.pathmodule.lexists(filename + "\udfff"), False
          )
          self.assertIs(
              self.pathmodule.lexists(bfilename + b"\xff"), False
          )
          self.assertIs(
              self.pathmodule.lexists(filename + "\x00"), False
          )
          self.assertIs(
              self.pathmodule.lexists(bfilename + b"\x00"), False
          )
  
imports: import genericpath
  import os
  import sys
  import unittest
  import warnings
  from test.support import is_emscripten
  from test.support import os_helper
  from test.support import warnings_helper
  from test.support.script_helper import assert_python_ok
  from test.support.os_helper import FakePath
label_desc: Use image node_id 5 for calling the GenericTest obj's underlying member method code with example usage: obj.test_exists() without return types