Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ jobs:
os: ubuntu-24.04-arm
- pyver: "3.12"
os: ubuntu-24.04-arm
# - pyver: "3.14"
# os: ubuntu-24.04
- pyver: "3.14"
os: ubuntu-24.04
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
Expand Down
2 changes: 1 addition & 1 deletion test/test_wordcloud_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def test_cli_regexp_invalid(tmp_text_file, capsys):
@pytest.mark.no_cover
@pytest.mark.parametrize("command,expected_output, expected_exit_code", [
("wordcloud_cli --help", "usage: wordcloud_cli", 0),
("%s -m wordcloud --help" % sys.executable, "usage: __main__", 0),
("%s -m wordcloud --help" % sys.executable, "A simple command line", 0),
("%s %s/../wordcloud/wordcloud_cli.py --help" % (sys.executable, os.path.dirname(__file__)), "To execute the CLI", 1),
])
def test_cli_as_executable(command, expected_output, expected_exit_code, tmpdir, capfd):
Expand Down
5 changes: 3 additions & 2 deletions wordcloud/wordcloud_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"""
from __future__ import absolute_import

import pathlib
import sys
import textwrap

Expand Down Expand Up @@ -116,10 +117,10 @@ def make_parser():
'--fontfile', metavar='path', dest='font_path',
help='path to font file you wish to use (default: DroidSansMono)')
parser.add_argument(
'--mask', metavar='file', type=argparse.FileType('rb'),
'--mask', metavar='file', type=pathlib.Path,
help='mask to use for the image form')
parser.add_argument(
'--colormask', metavar='file', type=argparse.FileType('rb'),
'--colormask', metavar='file', type=pathlib.Path,
help='color mask to use for image coloring')
parser.add_argument(
'--contour_width', metavar='width', default=0, type=float,
Expand Down