'--order=toptobottom detects the source line of methods from modules
whose source file is missing.'

def test_toptobottomMissingSource(self):

    tempdir = self.mktemp()
    package = FilePath(tempdir).child('twisted_toptobottom_temp')
    package.makedirs()
    package.child('__init__.py').setContent('')
    package.child('test_missing.py').setContent(textwrap.dedent('\n                                from    twisted.trial.unittest    import    TestCase\n                                class    TestMissing(TestCase):\n                                                def    test_second(self):    pass\n                                                def    test_third(self):    pass\n                                                def    test_fourth(self):    pass\n                                                def    test_first(self):    pass\n                                ').encode('utf8'))
    pathEntry = package.parent().path
    sys.path.insert(0, pathEntry)
    self.addCleanup(sys.path.remove, pathEntry)
    from twisted_toptobottom_temp import test_missing
    self.addCleanup(sys.modules.pop, 'twisted_toptobottom_temp')
    self.addCleanup(sys.modules.pop, test_missing.__name__)
    package.child('test_missing.py').remove()
    self.config.parseOptions(['--order', 'toptobottom', 'twisted.trial.test.ordertests'])
    loader = trial._getLoader(self.config)
    suite = loader.loadModule(test_missing)
    self.assertEqual(testNames(suite), ['twisted_toptobottom_temp.test_missing.TestMissing.test_second', 'twisted_toptobottom_temp.test_missing.TestMissing.test_third', 'twisted_toptobottom_temp.test_missing.TestMissing.test_fourth', 'twisted_toptobottom_temp.test_missing.TestMissing.test_first'])
