code: def test_round_to_float():
      """Test round to float function"""
      assert round_to_float(12.01934, 0.01) == 12.02
      assert round_to_float(12.01134, 0.01) == 12.01
      assert round_to_float(12.1934, 0.1) == 12.2
      assert round_to_float(12.1134, 0.1) == 12.1
      assert round_to_float(12.1134, 0.001) == 12.113
      assert round_to_float(12.1134, 0.00001) == 12.1134
      assert round_to_float(12.1934, 0.5) == 12.0
      assert round_to_float(12.2934, 0.5) == 12.5
  
file_path: pygal/pygal/test/test_util.py
imports: from pytest import raises
  from pygal.util import _swap_curly, majorize, mergextend, minify_css, round_to_float, round_to_int, template, truncate
label_desc: Use image node_id 2 for calling a global function with example usage: test_round_to_float() without return types