Skip to content

Commit

Permalink
Replace os.path.split with .dirname or .basename in two places (#508)
Browse files Browse the repository at this point in the history
  • Loading branch information
foolip committed Mar 1, 2023
1 parent 5decf47 commit 1cd57cb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion html5lib/tests/support.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion html5lib/tests/tokenizertotree.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 1cd57cb

Please sign in to comment.