コード例 #1
0
def test_parse_filename_page_ranges(params, expected):
    assert parse_filename_page_ranges(params) == expected
コード例 #2
0
def test_parse_filename_page_ranges_err():
    with pytest.raises(ValueError):
        parse_filename_page_ranges(["1:5", "foo.pdf"])
コード例 #3
0
ファイル: test_pagerange.py プロジェクト: mstamy2/PyPDF2
def test_parse_filename_page_ranges_err():
    with pytest.raises(ValueError) as exc:
        parse_filename_page_ranges(["1:5", "foo.pdf"])
    assert (
        exc.value.args[0] == "The first argument must be a filename, not a page range."
    )