From 08ebb0f97458a532070d6fd9b8f2a11a66c882e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20J=C3=A4genstedt?= Date: Fri, 14 Aug 2020 15:23:33 +0200 Subject: [PATCH] Replace os.path.split with .dirname or .basename in two places --- html5lib/tests/support.py | 2 +- html5lib/tests/tokenizertotree.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/html5lib/tests/support.py b/html5lib/tests/support.py index 9cd5afbe..1bd0ccc1 100644 --- a/html5lib/tests/support.py +++ b/html5lib/tests/support.py @@ -8,7 +8,7 @@ import glob import xml.sax.handler -base_path = os.path.split(__file__)[0] +base_path = os.path.dirname(__file__) test_dir = os.path.join(base_path, 'testdata') sys.path.insert(0, os.path.abspath(os.path.join(base_path, diff --git a/html5lib/tests/tokenizertotree.py b/html5lib/tests/tokenizertotree.py index 8528e876..42463f32 100644 --- a/html5lib/tests/tokenizertotree.py +++ b/html5lib/tests/tokenizertotree.py @@ -29,7 +29,7 @@ def run_file(filename, out_path): except ValueError: sys.stderr.write("Failed to load %s\n" % filename) return - name = os.path.splitext(os.path.split(filename)[1])[0] + name = os.path.splitext(os.path.basename(filename))[0] output_file = open(os.path.join(out_path, "tokenizer_%s.dat" % name), "w") if 'tests' in tests_data: pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy