Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1cd57cb

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

File tree

2 files changed

+2
-2
lines changed
Filter options

2 files changed

+2
-2
lines changed

‎html5lib/tests/support.py

Copy file name to clipboardExpand all lines: html5lib/tests/support.py
+1-1Lines 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

Copy file name to clipboardExpand all lines: html5lib/tests/tokenizertotree.py
+1-1Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.