diff --git a/nose2/plugins/loader/functions.py b/nose2/plugins/loader/functions.py
index d7b6563..5bd7212 100644
--- a/nose2/plugins/loader/functions.py
+++ b/nose2/plugins/loader/functions.py
@@ -87,6 +87,7 @@ class Functions(Plugin):
 
         parent, obj, name, index = result
         if (isinstance(obj, types.FunctionType) and not
+            isinstance(parent, type) and not
             util.isgenerator(obj) and not
             hasattr(obj, 'paramList') and
             util.num_expected_args(obj) == 0):

Failed to run a specific test with mock.patch decorator using nose2
This is my test file `test_mock.py` that minimally reproduces the failure:

```
import unittest
from unittest.mock import patch

class TestMock(unittest.TestCase):

    @patch("urllib3.PoolManager")
    def test_foo(self, mock_urllib3_poolmanager):
        pass
```

When I use nose2 to run all tests in this file. Everything works.

```
bash-4.2# nose2 test_mock
.
----------------------------------------------------------------------
Ran 1 test in 0.102s

OK
```

But when I use nose2 to select a specific test to run. It throws an error.

```
bash-4.2# nose2 test_mock.TestMock.test_foo
E
======================================================================
ERROR: test_mock.transplant_class.<locals>.C (test_foo)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/lang/lib/python3.7/unittest/mock.py", line 1256, in patched
    return func(*args, **keywargs)
TypeError: test_foo() missing 1 required positional argument: 'mock_urllib3_poolmanager'

----------------------------------------------------------------------
Ran 1 test in 0.087s

FAILED (errors=1)
```

Any insight is greatly appreciated. Thanks!
diff --git a/nose2/tests/unit/test_functions_loader.py b/nose2/tests/unit/test_functions_loader.py
index cf1d6fd..e6fd25d 100644
--- a/nose2/tests/unit/test_functions_loader.py
+++ b/nose2/tests/unit/test_functions_loader.py
@@ -1,4 +1,11 @@
 import unittest
+
+try:
+    from unittest import mock
+except ImportError:
+    # Python versions older than 3.3 don't have mock by default
+    import mock
+
 from nose2 import events, loader, session
 from nose2.plugins.loader import functions
 from nose2.tests._common import TestCase
@@ -47,3 +54,37 @@ class TestFunctionLoader(TestCase):
         event = events.LoadFromModuleEvent(self.loader, m)
         self.session.hooks.loadTestsFromModule(event)
         self.assertEqual(len(event.extraTests), 0)
+
+    def test_can_load_test_functions_from_name(self):
+        event = events.LoadFromNameEvent(self.loader, __name__+'.func', None)
+        suite = self.session.hooks.loadTestsFromName(event)
+        self.assertNotEqual(suite, None)
+
+    def test_ignores_test_methods_from_name(self):
+        # Should ignore test methods even when specified directly
+        event = events.LoadFromNameEvent(self.loader, __name__+'.Case.test_method', None)
+        suite = self.session.hooks.loadTestsFromName(event)
+        self.assertEqual(suite, None)
+
+    def test_ignores_decorated_test_methods_from_name(self):
+        # Should ignore test methods even when they are of FunctionType
+        event = events.LoadFromNameEvent(self.loader, __name__+'.Case.test_patched', None)
+        suite = self.session.hooks.loadTestsFromName(event)
+        self.assertEqual(suite, None)
+
+
+def func():
+    pass
+
+def dummy():
+    pass
+
+class Case(unittest.TestCase):
+    __test__ = False # do not run this
+
+    def test_method(self):
+        pass
+
+    @mock.patch(__name__+'.dummy')
+    def test_patched(self, mock):
+        pass

pip install -e .[doc]
parse_log_pytest
pytest
nose2 pytest
3.6
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
alabaster==0.7.13
attrs @ file:///opt/conda/conda-bld/attrs_1642510447205/work
Babel==2.11.0
certifi==2021.5.30
charset-normalizer==2.0.12
coverage==6.2
docutils==0.18.1
idna==3.10
imagesize==1.4.1
importlib-metadata @ file:///tmp/build/80754af9/importlib-metadata_1631916693255/work
iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work
Jinja2==3.0.3
MarkupSafe==2.0.1
mock==5.2.0
more-itertools @ file:///tmp/build/80754af9/more-itertools_1637733554872/work
-e git+https://github.com/nose-devs/nose2.git@049afb837852881460c18c81d32008c8fdef025b#egg=nose2
packaging @ file:///tmp/build/80754af9/packaging_1637314298585/work
pluggy @ file:///tmp/build/80754af9/pluggy_1615976315926/work
py @ file:///opt/conda/conda-bld/py_1644396412707/work
Pygments==2.14.0
pyparsing @ file:///tmp/build/80754af9/pyparsing_1635766073266/work
pytest==6.2.4
pytz==2025.2
requests==2.27.1
six==1.17.0
snowballstemmer==2.2.0
Sphinx==5.3.0
sphinx-rtd-theme==2.0.0
sphinxcontrib-applehelp==1.0.2
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-htmlhelp==2.0.0
sphinxcontrib-jquery==4.1
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
toml @ file:///tmp/build/80754af9/toml_1616166611790/work
typing_extensions @ file:///opt/conda/conda-bld/typing_extensions_1647553014482/work
urllib3==1.26.20
zipp @ file:///tmp/build/80754af9/zipp_1633618647012/work

name: nose2
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - attrs=21.4.0=pyhd3eb1b0_0
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - importlib-metadata=4.8.1=py36h06a4308_0
  - importlib_metadata=4.8.1=hd3eb1b0_0
  - iniconfig=1.1.1=pyhd3eb1b0_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - more-itertools=8.12.0=pyhd3eb1b0_0
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - packaging=21.3=pyhd3eb1b0_0
  - pip=21.2.2=py36h06a4308_0
  - pluggy=0.13.1=py36h06a4308_0
  - py=1.11.0=pyhd3eb1b0_0
  - pyparsing=3.0.4=pyhd3eb1b0_0
  - pytest=6.2.4=py36h06a4308_2
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - toml=0.10.2=pyhd3eb1b0_0
  - typing_extensions=4.1.1=pyh06a4308_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zipp=3.6.0=pyhd3eb1b0_0
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - alabaster==0.7.13
      - babel==2.11.0
      - charset-normalizer==2.0.12
      - coverage==6.2
      - docutils==0.18.1
      - idna==3.10
      - imagesize==1.4.1
      - jinja2==3.0.3
      - markupsafe==2.0.1
      - mock==5.2.0
      - pygments==2.14.0
      - pytz==2025.2
      - requests==2.27.1
      - six==1.17.0
      - snowballstemmer==2.2.0
      - sphinx==5.3.0
      - sphinx-rtd-theme==2.0.0
      - sphinxcontrib-applehelp==1.0.2
      - sphinxcontrib-devhelp==1.0.2
      - sphinxcontrib-htmlhelp==2.0.0
      - sphinxcontrib-jquery==4.1
      - sphinxcontrib-jsmath==1.0.1
      - sphinxcontrib-qthelp==1.0.3
      - sphinxcontrib-serializinghtml==1.1.5
      - urllib3==1.26.20
prefix: /opt/conda/envs/nose2

nose2/tests/unit/test_functions_loader.py::TestFunctionLoader::test_ignores_decorated_test_methods_from_name
nose2/tests/unit/test_functions_loader.py::TestFunctionLoader::test_can_load_test_functions_from_module nose2/tests/unit/test_functions_loader.py::TestFunctionLoader::test_can_load_test_functions_from_name nose2/tests/unit/test_functions_loader.py::TestFunctionLoader::test_ignores_functions_that_take_args nose2/tests/unit/test_functions_loader.py::TestFunctionLoader::test_ignores_generator_functions nose2/tests/unit/test_functions_loader.py::TestFunctionLoader::test_ignores_test_methods_from_name
nose2/plugins/loader/functions.py
nose2/plugins/loader/functions.py