Simplified consecutive calls to pathlib.Path.parent.
This commit is contained in:
parent
126cfefce2
commit
607004f81a
|
@ -11,7 +11,7 @@ except ImportError:
|
||||||
else:
|
else:
|
||||||
closure_compiler = closure.get_jar_filename()
|
closure_compiler = closure.get_jar_filename()
|
||||||
|
|
||||||
js_path = Path(__file__).parent.parent / 'static' / 'admin' / 'js'
|
js_path = Path(__file__).parents[1] / 'static' / 'admin' / 'js'
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
|
@ -757,7 +757,7 @@ class PlainTextReportTests(SimpleTestCase):
|
||||||
exc_type, exc_value, tb = sys.exc_info()
|
exc_type, exc_value, tb = sys.exc_info()
|
||||||
reporter = ExceptionReporter(request, exc_type, exc_value, tb)
|
reporter = ExceptionReporter(request, exc_type, exc_value, tb)
|
||||||
text = reporter.get_traceback_text()
|
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(
|
self.assertIn(
|
||||||
'Template error:\n'
|
'Template error:\n'
|
||||||
'In template %(path)s, error at line 2\n'
|
'In template %(path)s, error at line 2\n'
|
||||||
|
|
Loading…
Reference in New Issue