File tree Expand file tree Collapse file tree 2 files changed +24
-4
lines changed
Expand file tree Collapse file tree 2 files changed +24
-4
lines changed Original file line number Diff line number Diff line change 33from pathlib import Path
44
55
6- def test_cli (cog_count_file : Path , tmp_path : Path ):
7- """Test plot_cog_count_barchart CLI"""
6+ def test_cli_html (cog_count_file : Path , tmp_path : Path ):
7+ """Test plot_cog_count_barchart CLI (HTML format) """
88 outfile = tmp_path / "cog_count_barchart.html"
99 cmd = f"plot_cog_count_barchart -i { cog_count_file } -o { outfile } --width 540 --height 340 --bar_width 15" # noqa: E501
1010 cmd_args = shlex .split (cmd )
1111 result = sp .run (cmd_args )
1212 assert result .returncode == 0
1313 assert outfile .exists ()
14+
15+
16+ def test_cli_png (cog_count_file : Path , tmp_path : Path ):
17+ """Test plot_cog_count_barchart CLI (PNG format)"""
18+ outfile = tmp_path / "cog_count_barchart.png"
19+ cmd = f"plot_cog_count_barchart -i { cog_count_file } -o { outfile } --width 540 --height 340 --bar_width 15" # noqa: E501
20+ cmd_args = shlex .split (cmd )
21+ result = sp .run (cmd_args )
22+ assert result .returncode == 0
23+ assert outfile .exists ()
Original file line number Diff line number Diff line change 33from pathlib import Path
44
55
6- def test_cli (cog_count_file : Path , tmp_path : Path ):
7- """Test plot_cog_count_piechart CLI"""
6+ def test_cli_html (cog_count_file : Path , tmp_path : Path ):
7+ """Test plot_cog_count_piechart CLI (HTML format) """
88 outfile = tmp_path / "cog_count_barchart.html"
99 cmd = f"plot_cog_count_piechart -i { cog_count_file } -o { outfile } --width 380 --height 380 --show_letter --sort" # noqa: E501
1010 cmd_args = shlex .split (cmd )
1111 result = sp .run (cmd_args )
1212 assert result .returncode == 0
1313 assert outfile .exists ()
14+
15+
16+ def test_cli_png (cog_count_file : Path , tmp_path : Path ):
17+ """Test plot_cog_count_piechart CLI (PNG format)"""
18+ outfile = tmp_path / "cog_count_barchart.png"
19+ cmd = f"plot_cog_count_piechart -i { cog_count_file } -o { outfile } --width 380 --height 380 --show_letter --sort" # noqa: E501
20+ cmd_args = shlex .split (cmd )
21+ result = sp .run (cmd_args )
22+ assert result .returncode == 0
23+ assert outfile .exists ()
You can’t perform that action at this time.
0 commit comments