Ejemplo n.º 1
0
def test_get_ghostscript_binary_windows(pretend_windows, pretend_have_windows_ghostscript):
    assert treepoem._get_ghostscript_binary() == 'gswin32c'
Ejemplo n.º 2
0
def test_get_ghostscript_binary_windows_missing(pretend_windows):
    with pytest.raises(treepoem.TreepoemError) as excinfo:
        treepoem._get_ghostscript_binary()
    assert 'Cannot determine path to ghostscript' in str(excinfo.value)
Ejemplo n.º 3
0
def test_get_ghostscript_binary_windows(pretend_windows, pretend_have_windows_ghostscript):
    assert treepoem._get_ghostscript_binary() == 'gswin32c'
Ejemplo n.º 4
0
def test_get_ghostscript_binary_windows_missing(pretend_windows):
    with pytest.raises(treepoem.TreepoemError) as excinfo:
        treepoem._get_ghostscript_binary()
    assert 'Cannot determine path to ghostscript' in str(excinfo.value)
Ejemplo n.º 5
0
# -*- coding:utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals

import re
import subprocess
import sys

from treepoem import _get_ghostscript_binary

GHOSTSCRIPT_VERSION = subprocess.check_output([
    _get_ghostscript_binary(),
    '--version',
]).decode('utf-8')
if not re.match(r'9\.\d\d', GHOSTSCRIPT_VERSION):
    print(
        "Ghostscript must be version 9.X, have {}".format(GHOSTSCRIPT_VERSION),
    )
    sys.exit(1)


def pytest_report_header(config):
    return "Ghostscript version: {}".format(GHOSTSCRIPT_VERSION)
Ejemplo n.º 6
0
# -*- coding:utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals

import re
import subprocess
import sys

from treepoem import _get_ghostscript_binary

GHOSTSCRIPT_VERSION = subprocess.check_output([
    _get_ghostscript_binary(), '--version',
]).decode('utf-8')
if not re.match(r'9\.\d\d', GHOSTSCRIPT_VERSION):
    print(
        "Ghostscript must be version 9.X, have {}".format(GHOSTSCRIPT_VERSION),
    )
    sys.exit(1)


def pytest_report_header(config):
    return "Ghostscript version: {}".format(GHOSTSCRIPT_VERSION)
Ejemplo n.º 7
0
# -*- coding:utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals

import re
import subprocess
import sys

from treepoem import _get_ghostscript_binary

GHOSTSCRIPT_VERSION = subprocess.check_output(
    [_get_ghostscript_binary(), '--version']).decode('utf-8')
if not re.match(r'9\.\d\d', GHOSTSCRIPT_VERSION):
    print(
        "Ghostscript must be version 9.X, have {}".format(GHOSTSCRIPT_VERSION))
    sys.exit(1)


def pytest_report_header(config):
    return "Ghostscript version: {}".format(GHOSTSCRIPT_VERSION)
Ejemplo n.º 8
0
from __future__ import annotations

import re
import subprocess

from treepoem import _get_ghostscript_binary

GHOSTSCRIPT_VERSION = subprocess.check_output(
    [_get_ghostscript_binary(), "--version"]).decode("utf-8")
if not re.match(r"9\.\d\d", GHOSTSCRIPT_VERSION):
    print(f"Ghostscript must be version 9.X, have {GHOSTSCRIPT_VERSION}")
    raise SystemExit(1)


def pytest_report_header(config):
    return f"Ghostscript version: {GHOSTSCRIPT_VERSION}"
Ejemplo n.º 9
0
import re
import subprocess
import sys

from treepoem import _get_ghostscript_binary

GHOSTSCRIPT_VERSION = subprocess.check_output(
    [_get_ghostscript_binary(), "--version"]
).decode("utf-8")
if not re.match(r"9\.\d\d", GHOSTSCRIPT_VERSION):
    print("Ghostscript must be version 9.X, have {}".format(GHOSTSCRIPT_VERSION))
    sys.exit(1)


def pytest_report_header(config):
    return "Ghostscript version: {}".format(GHOSTSCRIPT_VERSION)