From: Ben Darnell Date: Tue, 26 Jul 2016 04:03:11 +0000 (-0400) Subject: options_test: Absolutize __file__ X-Git-Tag: v4.5.0~85^2 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1781%2Fhead;p=thirdparty%2Ftornado.git options_test: Absolutize __file__ Python 3.4 guarantees an absolute path, but in older versions relative paths are used in some cases. Fixes #1780 --- diff --git a/tornado/test/options_test.py b/tornado/test/options_test.py index f7b215c5a..c050cb648 100644 --- a/tornado/test/options_test.py +++ b/tornado/test/options_test.py @@ -36,7 +36,7 @@ class OptionsTest(unittest.TestCase): options.define("port", default=80) options.define("username", default='foo') options.define("my_path") - config_path = os.path.join(os.path.dirname(__file__), + config_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "options_test.cfg") options.parse_config_file(config_path) self.assertEqual(options.port, 443)