code: def test_layer_with_nodata():
      # no data but good mappings
      p = ggplot() + geom_point(aes([1, 2], [1, 2]))
      p.build_test()
  
      # no data, and unresolvable mappings
      p = ggplot(aes("x", "y")) + geom_point()
      with pytest.raises(PlotnineError) as pe:
          p.draw_test()
  
      assert "Could not evaluate the 'x' mapping:" in pe.value.message
  
file_path: plotnine/tests/test_layers.py
imports: from pathlib import Path
  import numpy
  import pandas
  import pytest
  from plotnine import aes, geom_path, geom_point, ggplot
  from plotnine.exceptions import PlotnineError, PlotnineWarning
  from plotnine.layer import Layers, layer
label_desc: Use image node_id 3 for calling a global function with example usage: test_layer_with_nodata() without return types