tests: don't try to pass Unicode arguments on command line on Linux

Depends on locale being configured properly, and it's not necessary
to be able to do this.
This commit is contained in:
James R. Barlow
2016-08-26 15:08:56 -07:00
parent 74cc2346a5
commit 4fed4e2af3

View File

@@ -13,6 +13,7 @@ import PyPDF2 as pypdf
from ocrmypdf import ExitCode
from ocrmypdf import leptonica
from ocrmypdf.pdfa import file_claims_pdfa
import platform
if sys.version_info.major < 3:
@@ -34,6 +35,10 @@ def running_in_docker():
return os.path.exists('/.dockerinit')
def is_linux():
return platform.system() == 'Linux'
def setup_module():
with suppress(FileNotFoundError):
shutil.rmtree(TEST_OUTPUT)
@@ -199,6 +204,9 @@ def test_preserve_metadata(spoof_tesseract_noop, output_type):
assert pdfa_info['output'] == output_type
@pytest.mark.skipif(
is_linux() and not running_in_docker(),
reason="likely to fail if Linux locale is not configured correctly")
@pytest.mark.parametrize("output_type", [
'pdfa', 'pdf'
])