class_docstr: Unit tests for the pwc_from_function decorator
class_docstr_tok: ["Unit","tests","for","the","pwc_from_function","decorator"]
docstr: Test that decorating a function with pwc_from_function returns a callable with arguments (params, t)
docstr_tok: ["Test","that","decorating","a","function","with","pwc_from_function","returns","a","callable","with","arguments","(","params",",","t",")"]
code: def test_use_as_decorator_returns_callable(self):
      """Test that decorating a function with pwc_from_function returns a callable with arguments (params, t)"""
  
      @qml.pulse.pwc_from_function(9, 10)
      def f(param, t):
          return t**2 + param
  
      argspec = inspect.getfullargspec(f)
  
      assert callable(f)
      assert argspec.args == ["params", "t"]
  
imports: import inspect
  from functools import partial
  import numpy
  import pytest
  import pennylane
  from pennylane.pulse.parametrized_hamiltonian import ParametrizedHamiltonian
label_desc: Use image node_id 2 for calling the TestPWC_from_function obj's underlying member method code with example usage: obj.test_use_as_decorator_returns_callable() and returns: unknown