Skip ghostscript tests on windows
parent
e76a7a7c26
commit
4c78dadd55
1
setup.py
1
setup.py
|
|
@ -60,6 +60,7 @@ def setup_package():
|
|||
extras_require={
|
||||
"all": all_requires,
|
||||
"base": base_requires,
|
||||
"cv": base_requires, # deprecate in v0.12.0
|
||||
"dev": dev_requires,
|
||||
"plot": plot_requires,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
import pandas as pd
|
||||
from pandas.testing import assert_frame_equal
|
||||
|
|
@ -59,6 +60,9 @@ def test_repr_poppler():
|
|||
|
||||
|
||||
def test_repr_ghostscript():
|
||||
if sys.platform not in ["linux", "darwin"]:
|
||||
return True
|
||||
|
||||
filename = os.path.join(testdir, "foo.pdf")
|
||||
tables = camelot.read_pdf(
|
||||
filename, backend=ImageConversionBackend(backend="ghostscript")
|
||||
|
|
@ -77,6 +81,9 @@ def test_url_poppler():
|
|||
|
||||
|
||||
def test_url_ghostscript():
|
||||
if sys.platform not in ["linux", "darwin"]:
|
||||
return True
|
||||
|
||||
url = "https://camelot-py.readthedocs.io/en/master/_static/pdf/foo.pdf"
|
||||
tables = camelot.read_pdf(
|
||||
url, backend=ImageConversionBackend(backend="ghostscript")
|
||||
|
|
@ -105,6 +112,9 @@ def test_pages_poppler():
|
|||
|
||||
|
||||
def test_pages_ghostscript():
|
||||
if sys.platform not in ["linux", "darwin"]:
|
||||
return True
|
||||
|
||||
url = "https://camelot-py.readthedocs.io/en/master/_static/pdf/foo.pdf"
|
||||
tables = camelot.read_pdf(url)
|
||||
assert repr(tables) == "<TableList n=1>"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
import pytest
|
||||
|
||||
|
|
@ -35,6 +36,9 @@ def test_lattice_contour_plot_poppler():
|
|||
|
||||
@pytest.mark.mpl_image_compare(baseline_dir="files/baseline_plots", remove_text=True)
|
||||
def test_lattice_contour_plot_ghostscript():
|
||||
if sys.platform not in ["linux", "darwin"]:
|
||||
return True
|
||||
|
||||
filename = os.path.join(testdir, "foo.pdf")
|
||||
tables = camelot.read_pdf(filename, backend=ImageConversionBackend("ghostscript"))
|
||||
return camelot.plot(tables[0], kind="contour")
|
||||
|
|
@ -56,6 +60,9 @@ def test_line_plot_poppler():
|
|||
|
||||
@pytest.mark.mpl_image_compare(baseline_dir="files/baseline_plots", remove_text=True)
|
||||
def test_line_plot_ghostscript():
|
||||
if sys.platform not in ["linux", "darwin"]:
|
||||
return True
|
||||
|
||||
filename = os.path.join(testdir, "foo.pdf")
|
||||
tables = camelot.read_pdf(filename, backend=ImageConversionBackend("ghostscript"))
|
||||
return camelot.plot(tables[0], kind="line")
|
||||
|
|
@ -70,6 +77,9 @@ def test_joint_plot_poppler():
|
|||
|
||||
@pytest.mark.mpl_image_compare(baseline_dir="files/baseline_plots", remove_text=True)
|
||||
def test_joint_plot_ghostscript():
|
||||
if sys.platform not in ["linux", "darwin"]:
|
||||
return True
|
||||
|
||||
filename = os.path.join(testdir, "foo.pdf")
|
||||
tables = camelot.read_pdf(filename, backend=ImageConversionBackend("ghostscript"))
|
||||
return camelot.plot(tables[0], kind="joint")
|
||||
|
|
@ -84,6 +94,9 @@ def test_grid_plot_poppler():
|
|||
|
||||
@pytest.mark.mpl_image_compare(baseline_dir="files/baseline_plots", remove_text=True)
|
||||
def test_grid_plot_ghostscript():
|
||||
if sys.platform not in ["linux", "darwin"]:
|
||||
return True
|
||||
|
||||
filename = os.path.join(testdir, "foo.pdf")
|
||||
tables = camelot.read_pdf(filename, backend=ImageConversionBackend("ghostscript"))
|
||||
return camelot.plot(tables[0], kind="grid")
|
||||
|
|
|
|||
Loading…
Reference in New Issue