Pywikibot uses nose attributes to select only tests that run on a certain site. This is used for the Travis-CI SITE_ONLY=1 jobs, so they run less unit tests on a specific host only in a short period of time.
py.test doesnt have any similar functionality. As it is a nose plugin, it should probably be re-implemented as a py.test plugin , and py.test says they merge any very useful plugins into the core product once it is stable.