code: def _x_test_set_state_int_to_int_like():
      # Note: Setting i to an int-like float will produce an
      # error, so if JSON producer were to always create
      # float formatted numbers, this would fail!
  
      w = NumberWidget()
      # Set floats to int-like floats
      w.set_state(dict(i=3.0))
      # Ensure no update message gets produced
      assert len(w.comm.messages) == 0
  
imports: import pytest
  from unittest import mock
  from traitlets import Bool, Tuple, List, Instance, CFloat, CInt, Float, Int, TraitError, observe
  from .utils import setup, teardown
  import ipywidgets
  from ipywidgets import Widget
label_desc: Use image node_id 15 for calling a global function with example usage: _x_test_set_state_int_to_int_like() without return types