code: def test_simple_line():
      """Simple line test"""
      line = Line()
      rng = range(-30, 31, 5)
      line.add("test1", [cos(x / 10) for x in rng])
      line.add("test2", [sin(x / 10) for x in rng])
      line.add("test3", [cos(x / 10) - sin(x / 10) for x in rng])
      line.x_labels = map(str, rng)
      line.title = "cos sin and cos - sin"
      q = line.render_pyquery()
      assert len(q(".axis.x")) == 1
      assert len(q(".axis.y")) == 1
      assert len(q(".plot .series path")) == 3
      assert len(q(".legend")) == 3
      assert len(q(".x.axis .guides")) == 13
      assert len(q(".y.axis .guides")) == 13
      assert len(q(".dots")) == 3 * 13
      assert q(".axis.x text").map(texts) == [
          "-30",
          "-25",
          "-20",
          "-15",
          "-10",
          "-5",
          "0",
          "5",
          "10",
          "15",
          "20",
          "25",
          "30",
      ]
      assert q(".axis.y text").map(texts) == [
          "-1.2",
          "-1",
          "-0.8",
          "-0.6",
          "-0.4",
          "-0.2",
          "0",
          "0.2",
          "0.4",
          "0.6",
          "0.8",
          "1",
          "1.2",
      ]
      assert q(".title").text() == "cos sin and cos - sin"
      assert q(".legend text").map(texts) == ["test1", "test2", "test3"]
  
file_path: pygal/pygal/test/test_line.py
imports: from __future__ import division
  from math import cos, sin
  from pygal import Line
  from pygal.test.utils import texts
label_desc: Use image node_id 1 for calling a global function with example usage: test_simple_line() without return types