1import os
2import unittest
3from nose.plugins import Plugin
4from nose.plugins.plugintest import PluginTester
5from nose.plugins.manager import ZeroNinePlugin
6
7here = os.path.abspath(os.path.dirname(__file__))
8
9support = os.path.join(os.path.dirname(os.path.dirname(here)), 'support')
10
11
12class EmptyPlugin(Plugin):
13    pass
14
15class TestEmptyPlugin(PluginTester, unittest.TestCase):
16    activate = '--with-empty'
17    plugins = [ZeroNinePlugin(EmptyPlugin())]
18    suitepath = os.path.join(here, 'empty_plugin.rst')
19
20    def test_empty_zero_nine_does_not_crash(self):
21        print self.output
22        assert "'EmptyPlugin' object has no attribute 'loadTestsFromPath'" \
23            not in self.output
24
25
26
27