]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
options_test: Absolutize __file__ 1781/head
authorBen Darnell <ben@bendarnell.com>
Tue, 26 Jul 2016 04:03:11 +0000 (00:03 -0400)
committerBen Darnell <ben@bendarnell.com>
Tue, 26 Jul 2016 04:03:11 +0000 (00:03 -0400)
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

index f7b215c5a5629d0c35e541f1c99e930f464e6abc..c050cb6486e8260c0924fcef0bac3fef076b2a63 100644 (file)
@@ -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)