code: def test_flags(self):
      # the OperationFlags enum is created when the first op is made --
      # make it ourselves in case we are run before that
      pyvips.vips_lib.vips_operation_flags_get_type()
      operationflags_gtype = pyvips.gobject_lib.g_type_from_name(
          b"VipsOperationFlags"
      )
      gv = pyvips.GValue()
      gv.set_type(operationflags_gtype)
      gv.set(12)
      value = gv.get()
      assert value == 12
  
      # we also support setting flags with strings
      gv.set("deprecated")
      value = gv.get()
      assert value == 8
  
file_path: pyvips/tests/test_gvalue.py
imports: import pytest
  import pyvips
  from helpers import JPEG_FILE, assert_almost_equal_objects
label_desc: Use image node_id 6 for calling the TestGValue obj's underlying member method code with example usage: obj.test_flags() without return types