'Check that --testmodule displays a meaningful error message when
passed a non-existent filename.'

def test_testmoduleOnNonexistentFile(self):

    buffy = NativeStringIO()
    (stderr, sys.stderr) = (sys.stderr, buffy)
    filename = 'test_thisbetternoteverexist.py'
    try:
        self.config.opt_testmodule(filename)
        self.assertEqual(0, len(self.config['tests']))
        self.assertEqual(("File    %r    doesn't    exist\n" % (filename,)), buffy.getvalue())
    finally:
        sys.stderr = stderr
