original_docstring: Gets an importable  name from a path.
  
          Note: This code is from the python unittest library
          
docstring: Gets an importable  name from a path.
  Note: This code is from the python unittest library
docstring_tokens: Gets an importable name from a path . Note : This code is from the python unittest library
code: def _get_name_from_path(self, path):
          """Gets an importable  name from a path.
  
          Note: This code is from the python unittest library
          """
          if path == self._top_level_dir:
              return '.'
          path = os.path.splitext(os.path.normpath(path))[0]
  
          _relpath = os.path.relpath(path, self._top_level_dir)
          assert not os.path.isabs(_relpath), 'Path must be within the project'
          assert not _relpath.startswith('..'), 'Path must be within the project'
  
          name = _relpath.replace(os.path.sep, '.')
          return name
code_tokens: def _get_name_from_path ( self , path ) : if path == self . _top_level_dir : return '.' path = os . path . splitext ( os . path . normpath ( path ) ) [ 0 ] _relpath = os . path . relpath ( path , self . _top_level_dir ) assert not os . path . isabs ( _relpath ) , 'Path must be within the project' assert not _relpath . startswith ( '..' ) , 'Path must be within the project' name = _relpath . replace ( os . path . sep , '.' ) return name
short_docstring: Gets an importable  name from a path.
short_docstring_tokens: Gets an importable name from a path .
comment: """Gets an importable  name from a path.
  
          Note: This code is from the python unittest library
          """