From 607004f81ae3ed082ffcfb2c979d19a7ae3a4122 Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Mon, 4 Nov 2019 00:59:34 -0800 Subject: Simplified consecutive calls to pathlib.Path.parent. --- tests/view_tests/tests/test_debug.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/view_tests/tests/test_debug.py b/tests/view_tests/tests/test_debug.py index 73430178d7..8e66bb3a03 100644 --- a/tests/view_tests/tests/test_debug.py +++ b/tests/view_tests/tests/test_debug.py @@ -757,7 +757,7 @@ class PlainTextReportTests(SimpleTestCase): exc_type, exc_value, tb = sys.exc_info() reporter = ExceptionReporter(request, exc_type, exc_value, tb) text = reporter.get_traceback_text() - templ_path = Path(Path(__file__).parent.parent, 'templates', 'debug', 'template_error.html') + templ_path = Path(Path(__file__).parents[1], 'templates', 'debug', 'template_error.html') self.assertIn( 'Template error:\n' 'In template %(path)s, error at line 2\n' -- cgit v1.3