From d588bfb77d8064e5f98fc77bbc42aa369987561c Mon Sep 17 00:00:00 2001 From: Ben Darnell Date: Tue, 26 Jul 2016 00:03:11 -0400 Subject: [PATCH] options_test: Absolutize __file__ Python 3.4 guarantees an absolute path, but in older versions relative paths are used in some cases. Fixes #1780 --- tornado/test/options_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.47.2