deeplook / svglib

Read SVG files and convert them to other formats.
GNU Lesser General Public License v3.0
315 stars 80 forks source link

introduce svg2pdf.1 man page #279

Closed gagath closed 3 years ago

gagath commented 3 years ago

It is always nice to have a man page for executables.

deeplook commented 3 years ago

Yay! How do we install this with pip/conda?

gagath commented 3 years ago

Yay! How do we install this with pip/conda?

Added a new commit for setup.py to automatically install the man page on the system.

deeplook commented 3 years ago

I don't know how much sense it would make to add a test for this, maybe like below? @claudep?

import sys
import subprocess

import pytest

@pytest.mark.skipif(sys.platform.startswith("win"), reason="Man pages not available on Windows.")
def test_installed_manpage():
    """Test if svg2pdf man page was installed."""
    try:
        subprocess.check_output(["man", "svg2pdf"])
        assert True
    except subprocess.CalledProcessError:
        assert False
gagath commented 3 years ago

I think it does not make sense to test this. You want to be able to run all of the tests before installing the package, but this test would verify that the manpage is installed after the package is installed. So it would always fail because tests should be ran before installing the package. In the end I think this kind of test is not necessary. You want to test the code, not the installation process.

My two cents.

claudep commented 3 years ago

I can live without a test for that.

deeplook commented 3 years ago

I guess you're right. ;)