message: [test] Enable setting category for inline tests.
  Inlined tests have a test function that is actually an instance method,
  which requires a slightly different approach when it comes to setting
  the category attribute. The attribute must be set on the actual
  function, rather than on a particular instance.
diff: @@ -4,6 +4,7 @@ from __future__ import print_function
  # System modules
  from distutils.version import LooseVersion, StrictVersion
  from functools import wraps
  +import inspect
  import os
  import platform
  import re
  @@ -305,6 +306,10 @@ def add_test_categories(cat):
  "@add_test_categories can only be used to decorate a test method")
  if hasattr(func, "categories"):
  cat.extend(func.categories)
  + # For instance methods, the attribute must be set on the actual function.
  + if inspect.ismethod(func):
  + func.__func__.categories = cat
  + else:
  func.categories = cat
  return func
  