def test_logFileNamed(self):
        """
        L{TwistOptions.opt_log_file} opens the given file name in append mode.
        """
        self.patchOpen()

        options = TwistOptions()
        options.opt_log_file("mylog")

        self.assertEqual([("mylog", "a")], self.opened)

        L{TwistOptions.opt_log_file} opens the given file name in append mode.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/application/twist/test/test_options.py