/usr/lib/python2.7/dist-packages/openpyxl/tests/conftest.py is in python-openpyxl 2.4.9-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | # Fixtures (pre-configured objects) for tests
import pytest
# objects under test
@pytest.fixture
def Image():
"""Image class"""
from openpyxl.drawing import Image
return Image
# utility fixtures
@pytest.fixture
def ws(Workbook):
"""Empty worksheet titled 'data'"""
wb = Workbook()
ws = wb.active
ws.title = 'data'
return ws
@pytest.fixture
def datadir():
"""DATADIR as a LocalPath"""
import os
from py._path.local import LocalPath
here = os.path.split(__file__)[0]
DATADIR = os.path.join(here, "data")
return LocalPath(DATADIR)
|