Skip to content

Commit 1cd57cb

Browse files
authored
Replace os.path.split with .dirname or .basename in two places (#508)
1 parent 5decf47 commit 1cd57cb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

html5lib/tests/support.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import glob
99
import xml.sax.handler
1010

11-
base_path = os.path.split(__file__)[0]
11+
base_path = os.path.dirname(__file__)
1212

1313
test_dir = os.path.join(base_path, 'testdata')
1414
sys.path.insert(0, os.path.abspath(os.path.join(base_path,

html5lib/tests/tokenizertotree.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def run_file(filename, out_path):
2929
except ValueError:
3030
sys.stderr.write("Failed to load %s\n" % filename)
3131
return
32-
name = os.path.splitext(os.path.split(filename)[1])[0]
32+
name = os.path.splitext(os.path.basename(filename))[0]
3333
output_file = open(os.path.join(out_path, "tokenizer_%s.dat" % name), "w")
3434

3535
if 'tests' in tests_data:

0 commit comments

Comments
 (0)
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