code: def test_isdir(self):
      filename = os_helper.TESTFN
      bfilename = os.fsencode(filename)
      self.assertIs(self.pathmodule.isdir(filename), False)
      self.assertIs(self.pathmodule.isdir(bfilename), False)
  
      self.assertIs(self.pathmodule.isdir(filename + "\udfff"), False)
      self.assertIs(self.pathmodule.isdir(bfilename + b"\xff"), False)
      self.assertIs(self.pathmodule.isdir(filename + "\x00"), False)
      self.assertIs(self.pathmodule.isdir(bfilename + b"\x00"), False)
  
      try:
          create_file(filename)
          self.assertIs(self.pathmodule.isdir(filename), False)
          self.assertIs(self.pathmodule.isdir(bfilename), False)
      finally:
          os_helper.unlink(filename)
  
      try:
          os.mkdir(filename)
          self.assertIs(self.pathmodule.isdir(filename), True)
          self.assertIs(self.pathmodule.isdir(bfilename), True)
      finally:
          os_helper.rmdir(filename)
  
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 7 for calling the GenericTest obj's underlying member method code with example usage: obj.test_isdir() without return types