code: def test_remove_layer_geojson(tmpdir):
      """Removal of layers is not supported by GeoJSON driver
  
      The reason for failure is slightly different between GDAL 2.2+ and < 2.2.
      With < 2.2 the datasource will fail to open in write mode (OSError), while
      with 2.2+ the datasource will open but the removal operation will fail (not
      supported).
      """
      filename = str(tmpdir.join("a_filename.geojson"))
      create_sample_data(filename, "GeoJSON")
      with pytest.raises((RuntimeError, OSError)):
          fiona.remove(filename, layer=0)
      assert os.path.exists(filename)
  
file_path: Fiona/tests/test_remove.py
imports: import logging
  import sys
  import os
  import itertools
  from .conftest import requires_gpkg
  import pytest
  import fiona
  from fiona.errors import DatasetDeleteError
  from fiona.model import Feature
label_desc: Use image node_id 6 for calling a global function with example usage: test_remove_layer_geojson(tmpdir) without return types