3.1.2: pytest fails in openpyxl/drawing/tests/test_drawing.py
I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.
python3 -sBm build -w --no-isolation
- because I'm calling
build
with--no-isolation
I'm using during all processes only locally installed modules - install .whl file in </install/prefix> using
installer
module - run pytest with $PYTHONPATH pointing to sitearch and sitelib inside </install/prefix>
- build is performed in env which is
cut off from access to the public network
(pytest is executed with-m "not network"
)
Here is pytest output:
+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-openpyxl-3.1.2-6.fc36.x86_64/usr/lib64/python3.9/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-openpyxl-3.1.2-6.fc36.x86_64/usr/lib/python3.9/site-packages
+ /usr/bin/pytest -ra -m 'not network'
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.9.18, pytest-8.1.1, pluggy-1.4.0
benchmark: 4.0.0 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
rootdir: /home/tkloczko/rpmbuild/BUILD/openpyxl-3.1.2
configfile: pytest.ini
plugins: hypothesis-6.99.6, Faker-24.2.0, benchmark-4.0.0
collected 2513 items
openpyxl/cell/tests/test_cell.py .........................s........x........................ [ 2%]
openpyxl/cell/tests/test_read_only.py ......... [ 2%]
openpyxl/cell/tests/test_rich_text.py ................. [ 3%]
openpyxl/cell/tests/test_text.py ............ [ 3%]
openpyxl/cell/tests/test_writer.py ....................................................... [ 6%]
openpyxl/chart/tests/test_3d.py .... [ 6%]
openpyxl/chart/tests/test_area_chart.py ..... [ 6%]
openpyxl/chart/tests/test_axis.py ................. [ 7%]
openpyxl/chart/tests/test_bar_chart.py ...... [ 7%]
openpyxl/chart/tests/test_bubble_chart.py .. [ 7%]
openpyxl/chart/tests/test_chart.py .................. [ 8%]
openpyxl/chart/tests/test_chartspace.py ........ [ 8%]
openpyxl/chart/tests/test_data_source.py .................. [ 9%]
openpyxl/chart/tests/test_error_bar.py .. [ 9%]
openpyxl/chart/tests/test_label.py .... [ 9%]
openpyxl/chart/tests/test_layout.py ... [ 9%]
openpyxl/chart/tests/test_legend.py .... [ 9%]
openpyxl/chart/tests/test_line_chart.py ..... [ 9%]
openpyxl/chart/tests/test_marker.py .... [ 10%]
openpyxl/chart/tests/test_picture.py .. [ 10%]
openpyxl/chart/tests/test_pie_chart.py ......... [ 10%]
openpyxl/chart/tests/test_pivot.py .... [ 10%]
openpyxl/chart/tests/test_plotarea.py ............ [ 11%]
openpyxl/chart/tests/test_print.py .... [ 11%]
openpyxl/chart/tests/test_radar_chart.py .. [ 11%]
openpyxl/chart/tests/test_reader.py ... [ 11%]
openpyxl/chart/tests/test_reference.py .......... [ 11%]
openpyxl/chart/tests/test_scatter_chart.py .. [ 11%]
openpyxl/chart/tests/test_series.py ......... [ 12%]
openpyxl/chart/tests/test_series_factory.py ....... [ 12%]
openpyxl/chart/tests/test_shapes.py .. [ 12%]
openpyxl/chart/tests/test_stock_chart.py .. [ 12%]
openpyxl/chart/tests/test_surface_chart.py ........ [ 13%]
openpyxl/chart/tests/test_text.py ..... [ 13%]
openpyxl/chart/tests/test_title.py ... [ 13%]
openpyxl/chart/tests/test_trendline.py .... [ 13%]
openpyxl/chart/tests/test_updown_bars.py .. [ 13%]
openpyxl/chartsheet/tests/test_chartsheet.py .... [ 13%]
openpyxl/chartsheet/tests/test_custom.py .... [ 13%]
openpyxl/chartsheet/tests/test_properties.py .. [ 14%]
openpyxl/chartsheet/tests/test_protection.py ... [ 14%]
openpyxl/chartsheet/tests/test_publish.py .... [ 14%]
openpyxl/chartsheet/tests/test_relation.py .... [ 14%]
openpyxl/chartsheet/tests/test_views.py .... [ 14%]
openpyxl/comments/tests/test_author.py .. [ 14%]
openpyxl/comments/tests/test_comment.py .... [ 14%]
openpyxl/comments/tests/test_comment_reader.py ... [ 14%]
openpyxl/comments/tests/test_comment_sheet.py ...... [ 15%]
openpyxl/comments/tests/test_shape_writer.py .... [ 15%]
openpyxl/compat/tests/test_compat.py ........s..... [ 15%]
openpyxl/descriptors/tests/test_base.py ................................................ [ 17%]
openpyxl/descriptors/tests/test_excel.py ................................ [ 19%]
openpyxl/descriptors/tests/test_namespace.py ... [ 19%]
openpyxl/descriptors/tests/test_nested.py ......................... [ 20%]
openpyxl/descriptors/tests/test_sequence.py ................... [ 20%]
openpyxl/descriptors/tests/test_serialisable.py ............... [ 21%]
openpyxl/drawing/tests/test_color.py ............ [ 22%]
openpyxl/drawing/tests/test_connector.py x. [ 22%]
openpyxl/drawing/tests/test_descriptors.py . [ 22%]
openpyxl/drawing/tests/test_drawing.py FFFFFFFF [ 22%]
openpyxl/drawing/tests/test_effect.py ...... [ 22%]
openpyxl/drawing/tests/test_fill.py ................. [ 23%]
openpyxl/drawing/tests/test_geometry.py ................ [ 24%]
openpyxl/drawing/tests/test_graphic.py ...........xx.. [ 24%]
openpyxl/drawing/tests/test_image.py s..... [ 24%]
openpyxl/drawing/tests/test_line.py ....... [ 25%]
openpyxl/drawing/tests/test_picture.py ........ [ 25%]
openpyxl/drawing/tests/test_properties.py .......... [ 25%]
openpyxl/drawing/tests/test_relation.py .. [ 25%]
openpyxl/drawing/tests/test_spreadsheet_drawing.py .......................... [ 26%]
openpyxl/drawing/tests/test_text.py .............. [ 27%]
openpyxl/formatting/tests/test_formatting.py ....... [ 27%]
openpyxl/formatting/tests/test_rule.py ................................ [ 29%]
openpyxl/formula/tests/test_tokenizer.py ............................................................................................................................................ [ 34%]
...................................................... [ 36%]
openpyxl/formula/tests/test_translate.py ......................................................................................................................... [ 41%]
openpyxl/packaging/tests/test_core.py ........ [ 41%]
openpyxl/packaging/tests/test_custom.py ............................... [ 43%]
openpyxl/packaging/tests/test_extended.py .. [ 43%]
openpyxl/packaging/tests/test_interface.py . [ 43%]
openpyxl/packaging/tests/test_manifest.py .................... [ 44%]
openpyxl/packaging/tests/test_pivot.py .. [ 44%]
openpyxl/packaging/tests/test_relationship.py ...... [ 44%]
openpyxl/packaging/tests/test_workbook.py ... [ 44%]
openpyxl/pivot/tests/test_cache.py .......................... [ 45%]
openpyxl/pivot/tests/test_fields.py .............. [ 46%]
openpyxl/pivot/tests/test_record.py ..... [ 46%]
openpyxl/pivot/tests/test_table.py ................x.................x [ 47%]
openpyxl/reader/tests/test_drawings.py .... [ 47%]
openpyxl/reader/tests/test_excel.py ............................... [ 49%]
openpyxl/reader/tests/test_strings.py ... [ 49%]
openpyxl/reader/tests/test_workbook.py ........... [ 49%]
openpyxl/styles/tests/test_alignments.py ... [ 49%]
openpyxl/styles/tests/test_borders.py .. [ 49%]
openpyxl/styles/tests/test_cell_style.py .......... [ 50%]
openpyxl/styles/tests/test_colors.py .................. [ 50%]
openpyxl/styles/tests/test_differential.py .... [ 51%]
openpyxl/styles/tests/test_fills.py ............................. [ 52%]
openpyxl/styles/tests/test_fonts.py .... [ 52%]
openpyxl/styles/tests/test_named_style.py ......................... [ 53%]
openpyxl/styles/tests/test_number_style.py .............................................................................. [ 56%]
openpyxl/styles/tests/test_protection.py .. [ 56%]
openpyxl/styles/tests/test_proxy.py ..... [ 56%]
openpyxl/styles/tests/test_styleable.py .......... [ 57%]
openpyxl/styles/tests/test_stylesheet.py .................... [ 58%]
openpyxl/styles/tests/test_table.py ...... [ 58%]
openpyxl/tests/test_backend.py .. [ 58%]
openpyxl/tests/test_iter.py ................................................... [ 60%]
openpyxl/tests/test_read.py ...... [ 60%]
openpyxl/tests/test_read_write_custom_doc_props.py .x [ 60%]
openpyxl/tests/test_vba.py .... [ 60%]
openpyxl/utils/tests/test_bound_dictionary.py ... [ 60%]
openpyxl/utils/tests/test_cell.py ..................................................................... [ 63%]
openpyxl/utils/tests/test_dataframe.py sssssss [ 63%]
openpyxl/utils/tests/test_datetime.py ................................................................................................ [ 67%]
openpyxl/utils/tests/test_escape.py .. [ 67%]
openpyxl/utils/tests/test_formulas.py .... [ 68%]
openpyxl/utils/tests/test_indexed_list.py ...... [ 68%]
openpyxl/utils/tests/test_inference.py .................. [ 69%]
openpyxl/utils/tests/test_protection.py . [ 69%]
openpyxl/utils/tests/test_units.py ......................................................................... [ 71%]
openpyxl/workbook/external_link/tests/test_external.py ......... [ 72%]
openpyxl/workbook/tests/test_child.py ..................... [ 73%]
openpyxl/workbook/tests/test_defined_name.py .................................... [ 74%]
openpyxl/workbook/tests/test_external_reference.py .. [ 74%]
openpyxl/workbook/tests/test_function_group.py .... [ 74%]
openpyxl/workbook/tests/test_properties.py ...... [ 75%]
openpyxl/workbook/tests/test_protection.py ..... [ 75%]
openpyxl/workbook/tests/test_smart_tags.py ...... [ 75%]
openpyxl/workbook/tests/test_views.py .... [ 75%]
openpyxl/workbook/tests/test_web.py ...... [ 75%]
openpyxl/workbook/tests/test_workbook.py ...........x............................. [ 77%]
openpyxl/workbook/tests/test_writer.py ............. [ 78%]
openpyxl/worksheet/tests/test_cell_range.py ........................................................... [ 80%]
openpyxl/worksheet/tests/test_controls.py .. [ 80%]
openpyxl/worksheet/tests/test_datavalidation.py ................... [ 81%]
openpyxl/worksheet/tests/test_dimensions.py ........................ [ 82%]
openpyxl/worksheet/tests/test_filters.py .............................. [ 83%]
openpyxl/worksheet/tests/test_formula.py .. [ 83%]
openpyxl/worksheet/tests/test_header.py .................. [ 84%]
openpyxl/worksheet/tests/test_hyperlink.py ..... [ 84%]
openpyxl/worksheet/tests/test_merge.py ............... [ 84%]
openpyxl/worksheet/tests/test_ole.py .. [ 85%]
openpyxl/worksheet/tests/test_page.py ........ [ 85%]
openpyxl/worksheet/tests/test_pagebreak.py ..... [ 85%]
openpyxl/worksheet/tests/test_print_settings.py ........................ [ 86%]
openpyxl/worksheet/tests/test_properties.py ... [ 86%]
openpyxl/worksheet/tests/test_protection.py ...... [ 86%]
openpyxl/worksheet/tests/test_read_only.py .................... [ 87%]
openpyxl/worksheet/tests/test_reader.py .......................................................................... [ 90%]
openpyxl/worksheet/tests/test_related.py . [ 90%]
openpyxl/worksheet/tests/test_scenario.py ...... [ 90%]
openpyxl/worksheet/tests/test_table.py ....................... [ 91%]
openpyxl/worksheet/tests/test_views.py ...... [ 92%]
openpyxl/worksheet/tests/test_worksheet.py ..................................................................................................... [ 96%]
openpyxl/worksheet/tests/test_worksheet_copy.py ............... [ 96%]
openpyxl/worksheet/tests/test_write_only.py .......... [ 97%]
openpyxl/worksheet/tests/test_writer.py ................................. [ 98%]
openpyxl/writer/tests/test_excel.py ............ [ 98%]
openpyxl/writer/tests/test_template.py ................ [ 99%]
openpyxl/xml/tests/test_functions.py ..ssss....... [100%]
========================================================================================= FAILURES ==========================================================================================
___________________________________________________________________________________ TestDrawing.test_ctor ___________________________________________________________________________________
self = <openpyxl.drawing.tests.test_drawing.TestDrawing object at 0x7f4607aee670>
def test_ctor(self):
> d = self.drawing
E AttributeError: 'TestDrawing' object has no attribute 'drawing'
self = <openpyxl.drawing.tests.test_drawing.TestDrawing object at 0x7f4607aee670>
/home/tkloczko/rpmbuild/BUILD/openpyxl-3.1.2/openpyxl/drawing/tests/test_drawing.py:17: AttributeError
__________________________________________________________________________________ TestDrawing.test_width ___________________________________________________________________________________
self = <openpyxl.drawing.tests.test_drawing.TestDrawing object at 0x7f4607aee040>
def test_width(self):
> d = self.drawing
E AttributeError: 'TestDrawing' object has no attribute 'drawing'
self = <openpyxl.drawing.tests.test_drawing.TestDrawing object at 0x7f4607aee040>
/home/tkloczko/rpmbuild/BUILD/openpyxl-3.1.2/openpyxl/drawing/tests/test_drawing.py:30: AttributeError
____________________________________________________________________________ TestDrawing.test_proportional_width ____________________________________________________________________________
self = <openpyxl.drawing.tests.test_drawing.TestDrawing object at 0x7f4607aee970>
def test_proportional_width(self):
> d = self.drawing
E AttributeError: 'TestDrawing' object has no attribute 'drawing'
self = <openpyxl.drawing.tests.test_drawing.TestDrawing object at 0x7f4607aee970>
/home/tkloczko/rpmbuild/BUILD/openpyxl-3.1.2/openpyxl/drawing/tests/test_drawing.py:36: AttributeError
__________________________________________________________________________________ TestDrawing.test_height __________________________________________________________________________________
self = <openpyxl.drawing.tests.test_drawing.TestDrawing object at 0x7f4607aee610>
def test_height(self):
> d = self.drawing
E AttributeError: 'TestDrawing' object has no attribute 'drawing'
self = <openpyxl.drawing.tests.test_drawing.TestDrawing object at 0x7f4607aee610>
/home/tkloczko/rpmbuild/BUILD/openpyxl-3.1.2/openpyxl/drawing/tests/test_drawing.py:43: AttributeError
___________________________________________________________________________ TestDrawing.test_proportional_height ____________________________________________________________________________
self = <openpyxl.drawing.tests.test_drawing.TestDrawing object at 0x7f4607aeedc0>
def test_proportional_height(self):
> d = self.drawing
E AttributeError: 'TestDrawing' object has no attribute 'drawing'
self = <openpyxl.drawing.tests.test_drawing.TestDrawing object at 0x7f4607aeedc0>
/home/tkloczko/rpmbuild/BUILD/openpyxl-3.1.2/openpyxl/drawing/tests/test_drawing.py:49: AttributeError
______________________________________________________________________________ TestDrawing.test_set_dimension _______________________________________________________________________________
self = <openpyxl.drawing.tests.test_drawing.TestDrawing object at 0x7f4607aeeee0>
def test_set_dimension(self):
> d = self.drawing
E AttributeError: 'TestDrawing' object has no attribute 'drawing'
self = <openpyxl.drawing.tests.test_drawing.TestDrawing object at 0x7f4607aeeee0>
/home/tkloczko/rpmbuild/BUILD/openpyxl-3.1.2/openpyxl/drawing/tests/test_drawing.py:56: AttributeError
_____________________________________________________________________________ TestDrawing.test_absolute_anchor ______________________________________________________________________________
self = <openpyxl.drawing.tests.test_drawing.TestDrawing object at 0x7f4607aeeb20>
@pytest.mark.pil_required
def test_absolute_anchor(self):
> node = self.drawing.anchor
E AttributeError: 'TestDrawing' object has no attribute 'drawing'
self = <openpyxl.drawing.tests.test_drawing.TestDrawing object at 0x7f4607aeeb20>
/home/tkloczko/rpmbuild/BUILD/openpyxl-3.1.2/openpyxl/drawing/tests/test_drawing.py:69: AttributeError
______________________________________________________________________________ TestDrawing.test_onecell_anchor ______________________________________________________________________________
self = <openpyxl.drawing.tests.test_drawing.TestDrawing object at 0x7f4607aea310>
@pytest.mark.pil_required
def test_onecell_anchor(self):
> self.drawing.anchortype = "oneCell"
E AttributeError: 'TestDrawing' object has no attribute 'drawing'
self = <openpyxl.drawing.tests.test_drawing.TestDrawing object at 0x7f4607aea310>
/home/tkloczko/rpmbuild/BUILD/openpyxl-3.1.2/openpyxl/drawing/tests/test_drawing.py:84: AttributeError
========================================================================================= XFAILURES =========================================================================================
______________________________________________________________________________________ test_timedelta _______________________________________________________________________________________
dummy_cell = <Cell 'Dummy Worksheet'.A1>
@pytest.mark.xfail
def test_timedelta(dummy_cell):
cell = dummy_cell
cell.value = timedelta(days=1, hours=3)
> assert cell.value == 1.125
E AssertionError: assert datetime.timedelta(days=1, seconds=10800) == 1.125
E + where datetime.timedelta(days=1, seconds=10800) = <Cell 'Dummy Worksheet'.A1>.value
cell = <Cell 'Dummy Worksheet'.A1>
dummy_cell = <Cell 'Dummy Worksheet'.A1>
openpyxl/cell/tests/test_cell.py:218: AssertionError
_______________________________________________________________________________ TestConnectorShape.test_ctor ________________________________________________________________________________
self = <openpyxl.drawing.tests.test_connector.TestConnectorShape object at 0x7f4607a9f520>, ConnectorShape = <class 'openpyxl.drawing.connector.ConnectorShape'>
@pytest.mark.xfail
def test_ctor(self, ConnectorShape):
> fut = ConnectorShape()
ConnectorShape = <class 'openpyxl.drawing.connector.ConnectorShape'>
self = <openpyxl.drawing.tests.test_connector.TestConnectorShape object at 0x7f4607a9f520>
/home/tkloczko/rpmbuild/BUILD/openpyxl-3.1.2/openpyxl/drawing/tests/test_connector.py:20:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/tkloczko/rpmbuild/BUILD/openpyxl-3.1.2/openpyxl/drawing/connector.py:95: in __init__
self.nvCxnSpPr = nvCxnSpPr
fPublished = None
macro = None
nvCxnSpPr = None
self = <openpyxl.drawing.connector.ConnectorShape object>
Parameters:
macro=None, fPublished=None, nvCxnSpPr=None, spPr=None, style=None
spPr = None
style = None
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = Values must be of type <class 'openpyxl.drawing.connector.ConnectorNonVisual'>
instance = <openpyxl.drawing.connector.ConnectorShape object>
Parameters:
macro=None, fPublished=None, nvCxnSpPr=None, spPr=None, style=None, value = None
def __set__(self, instance, value):
if not isinstance(value, self.expected_type):
if (not self.allow_none
or (self.allow_none and value is not None)):
msg = f"{instance.__class__}.{self.name} should be {self.expected_type} but value is {type(value)}"
if DEBUG:
msg = f"{instance.__class__}.{self.name} should be {self.expected_type} but {value} is {type(value)}"
> raise TypeError(msg)
E TypeError: <class 'openpyxl.drawing.connector.ConnectorShape'>.nvCxnSpPr should be <class 'openpyxl.drawing.connector.ConnectorNonVisual'> but value is <class 'NoneType'>
__class__ = <class 'openpyxl.descriptors.base.Typed'>
instance = <openpyxl.drawing.connector.ConnectorShape object>
Parameters:
macro=None, fPublished=None, nvCxnSpPr=None, spPr=None, style=None
msg = "<class 'openpyxl.drawing.connector.ConnectorShape'>.nvCxnSpPr should be <class 'openpyxl.drawing.connector.ConnectorNonVisual'> but value is <class 'NoneType'>"
self = Values must be of type <class 'openpyxl.drawing.connector.ConnectorNonVisual'>
value = None
/home/tkloczko/rpmbuild/BUILD/openpyxl-3.1.2/openpyxl/descriptors/base.py:46: TypeError
_________________________________________________________________________________ TestGroupShape.test_ctor __________________________________________________________________________________
self = <openpyxl.drawing.tests.test_graphic.TestGroupShape object at 0x7f4607a04cd0>, GroupShape = <class 'openpyxl.drawing.graphic.GroupShape'>
@pytest.mark.xfail
def test_ctor(self, GroupShape):
> grp = GroupShape()
GroupShape = <class 'openpyxl.drawing.graphic.GroupShape'>
self = <openpyxl.drawing.tests.test_graphic.TestGroupShape object at 0x7f4607a04cd0>
/home/tkloczko/rpmbuild/BUILD/openpyxl-3.1.2/openpyxl/drawing/tests/test_graphic.py:197:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/tkloczko/rpmbuild/BUILD/openpyxl-3.1.2/openpyxl/drawing/graphic.py:175: in __init__
self.nvGrpSpPr = nvGrpSpPr
grpSpPr = None
nvGrpSpPr = None
pic = None
self = <[TypeError('can only concatenate tuple (not "list") to tuple') raised in repr()] GroupShape object at 0x7f4606e7a190>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = Values must be of type <class 'openpyxl.drawing.properties.NonVisualGroupShape'>
instance = <[TypeError('can only concatenate tuple (not "list") to tuple') raised in repr()] GroupShape object at 0x7f4606e7a190>, value = None
def __set__(self, instance, value):
if not isinstance(value, self.expected_type):
if (not self.allow_none
or (self.allow_none and value is not None)):
msg = f"{instance.__class__}.{self.name} should be {self.expected_type} but value is {type(value)}"
if DEBUG:
msg = f"{instance.__class__}.{self.name} should be {self.expected_type} but {value} is {type(value)}"
> raise TypeError(msg)
E TypeError: <class 'openpyxl.drawing.graphic.GroupShape'>.nvGrpSpPr should be <class 'openpyxl.drawing.properties.NonVisualGroupShape'> but value is <class 'NoneType'>
__class__ = <class 'openpyxl.descriptors.base.Typed'>
instance = <[TypeError('can only concatenate tuple (not "list") to tuple') raised in repr()] GroupShape object at 0x7f4606e7a190>
msg = "<class 'openpyxl.drawing.graphic.GroupShape'>.nvGrpSpPr should be <class 'openpyxl.drawing.properties.NonVisualGroupShape'> but value is <class 'NoneType'>"
self = Values must be of type <class 'openpyxl.drawing.properties.NonVisualGroupShape'>
value = None
/home/tkloczko/rpmbuild/BUILD/openpyxl-3.1.2/openpyxl/descriptors/base.py:46: TypeError
_______________________________________________________________________________ TestGroupShape.test_from_xml ________________________________________________________________________________
self = <openpyxl.drawing.tests.test_graphic.TestGroupShape object at 0x7f4607b22e20>, GroupShape = <class 'openpyxl.drawing.graphic.GroupShape'>
@pytest.mark.xfail
def test_from_xml(self, GroupShape):
src = """
<xdr:grpSp xmlns:xdr="http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing"
xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main">
<xdr:nvGrpSpPr>
<xdr:cNvPr id="14" name="Group 13"/>
<xdr:cNvGrpSpPr/>
</xdr:nvGrpSpPr>
<xdr:grpSpPr>
<a:xfrm>
<a:off x="0" y="394447"/>
<a:ext cx="1944896" cy="707294"/>
<a:chOff x="0" y="351692"/>
<a:chExt cx="1918002" cy="670746"/>
</a:xfrm>
</xdr:grpSpPr>
<xdr:sp macro="" textlink="">
<xdr:nvSpPr>
<xdr:cNvPr id="15" name="Rectangle 14"/>
<xdr:cNvSpPr/>
</xdr:nvSpPr>
<xdr:spPr>
<a:xfrm>
<a:off x="562916" y="377825"/>
<a:ext cx="182880" cy="137982"/>
</a:xfrm>
<a:prstGeom prst="rect">
<a:avLst/>
</a:prstGeom>
<a:solidFill>
<a:schemeClr val="accent3">
<a:lumMod val="60000"/>
<a:lumOff val="40000"/>
</a:schemeClr>
</a:solidFill>
<a:ln w="9525">
<a:solidFill>
<a:sysClr val="windowText" lastClr="000000"/>
</a:solidFill>
</a:ln>
</xdr:spPr>
<xdr:style>
<a:lnRef idx="2">
<a:schemeClr val="accent1">
<a:shade val="50000"/>
</a:schemeClr>
</a:lnRef>
<a:fillRef idx="1">
<a:schemeClr val="accent1"/>
</a:fillRef>
<a:effectRef idx="0">
<a:schemeClr val="accent1"/>
</a:effectRef>
<a:fontRef idx="minor">
<a:schemeClr val="lt1"/>
</a:fontRef>
</xdr:style>
<xdr:txBody>
<a:bodyPr vertOverflow="clip" horzOverflow="clip" rtlCol="0" anchor="t"/>
<a:lstStyle/>
<a:p>
<a:pPr algn="l"/>
<a:endParaRPr lang="en-US" sz="1100"/>
</a:p>
</xdr:txBody>
</xdr:sp>
</xdr:grpSp>
"""
node = fromstring(src)
grp = GroupShape.from_tree(node)
> assert grp == GroupShape()
GroupShape = <class 'openpyxl.drawing.graphic.GroupShape'>
grp = <[TypeError('can only concatenate tuple (not "list") to tuple') raised in repr()] GroupShape object at 0x7f4606f2b730>
node = <Element {http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing}grpSp at 0x7f4607171900>
self = <openpyxl.drawing.tests.test_graphic.TestGroupShape object at 0x7f4607b22e20>
src = '\n <xdr:grpSp xmlns:xdr="http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing"\n xmlns:a.../>\n </a:p>\n </xdr:txBody>\n </xdr:sp>\n </xdr:grpSp>\n\n '
/home/tkloczko/rpmbuild/BUILD/openpyxl-3.1.2/openpyxl/drawing/tests/test_graphic.py:278:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/tkloczko/rpmbuild/BUILD/openpyxl-3.1.2/openpyxl/drawing/graphic.py:175: in __init__
self.nvGrpSpPr = nvGrpSpPr
grpSpPr = None
nvGrpSpPr = None
pic = None
self = <[TypeError('can only concatenate tuple (not "list") to tuple') raised in repr()] GroupShape object at 0x7f4606f2b6a0>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = Values must be of type <class 'openpyxl.drawing.properties.NonVisualGroupShape'>
instance = <[TypeError('can only concatenate tuple (not "list") to tuple') raised in repr()] GroupShape object at 0x7f4606f2b6a0>, value = None
def __set__(self, instance, value):
if not isinstance(value, self.expected_type):
if (not self.allow_none
or (self.allow_none and value is not None)):
msg = f"{instance.__class__}.{self.name} should be {self.expected_type} but value is {type(value)}"
if DEBUG:
msg = f"{instance.__class__}.{self.name} should be {self.expected_type} but {value} is {type(value)}"
> raise TypeError(msg)
E TypeError: <class 'openpyxl.drawing.graphic.GroupShape'>.nvGrpSpPr should be <class 'openpyxl.drawing.properties.NonVisualGroupShape'> but value is <class 'NoneType'>
__class__ = <class 'openpyxl.descriptors.base.Typed'>
instance = <[TypeError('can only concatenate tuple (not "list") to tuple') raised in repr()] GroupShape object at 0x7f4606f2b6a0>
msg = "<class 'openpyxl.drawing.graphic.GroupShape'>.nvGrpSpPr should be <class 'openpyxl.drawing.properties.NonVisualGroupShape'> but value is <class 'NoneType'>"
self = Values must be of type <class 'openpyxl.drawing.properties.NonVisualGroupShape'>
value = None
/home/tkloczko/rpmbuild/BUILD/openpyxl-3.1.2/openpyxl/descriptors/base.py:46: TypeError
______________________________________________________________________ TestPivotTableDefinition.test_formatted_fields _______________________________________________________________________
self = <openpyxl.pivot.tests.test_table.TestPivotTableDefinition object at 0x7f46078ef9d0>, TableDefinition = <class 'openpyxl.pivot.table.TableDefinition'>
datadir = local('/home/tkloczko/rpmbuild/BUILD/openpyxl-3.1.2/openpyxl/pivot/tests/data')
@pytest.mark.xfail
def test_formatted_fields(self, TableDefinition, datadir):
datadir.chdir()
> with open("table_with_conditional.xml", "rb") as src:
E FileNotFoundError: [Errno 2] No such file or directory: 'table_with_conditional.xml'
TableDefinition = <class 'openpyxl.pivot.table.TableDefinition'>
datadir = local('/home/tkloczko/rpmbuild/BUILD/openpyxl-3.1.2/openpyxl/pivot/tests/data')
self = <openpyxl.pivot.tests.test_table.TestPivotTableDefinition object at 0x7f46078ef9d0>
/home/tkloczko/rpmbuild/BUILD/openpyxl-3.1.2/openpyxl/pivot/tests/test_table.py:248: FileNotFoundError
___________________________________________________________________________ TestConditionalFormatList.test_dedupe ___________________________________________________________________________
self = <openpyxl.pivot.tests.test_table.TestConditionalFormatList object at 0x7f46078e99d0>, ConditionalFormatList = <class 'openpyxl.pivot.table.ConditionalFormatList'>
@pytest.mark.xfail
def test_dedupe(self, ConditionalFormatList):
src = """
<conditionalFormats count="3">
<conditionalFormat scope="data" priority="3">
<pivotAreas count="1">
<pivotArea outline="0" fieldPosition="0">
<references count="1">
<reference field="4294967294" count="1" selected="0">
<x v="0"/>
</reference>
</references>
</pivotArea>
</pivotAreas>
</conditionalFormat>
<conditionalFormat scope="data" priority="2">
<pivotAreas count="1">
<pivotArea outline="0" fieldPosition="0">
<references count="1">
<reference field="4294967294" count="1" selected="0">
<x v="1"/>
</reference>
</references>
</pivotArea>
</pivotAreas>
</conditionalFormat>
<conditionalFormat scope="data" priority="1">
<pivotAreas count="1">
<pivotArea outline="0" fieldPosition="0">
<references count="1">
<reference field="4294967294" count="1" selected="0">
<x v="1"/>
</reference>
</references>
</pivotArea>
</pivotAreas>
</conditionalFormat>
</conditionalFormats>
"""
node = fromstring(src)
fmts = ConditionalFormatList.from_tree(node)
fmts._dedupe()
xml = tostring(fmts.to_tree())
expected = """
<conditionalFormats count="2">
<conditionalFormat scope="data" priority="3">
<pivotAreas>
<pivotArea dataOnly="1" outline="0" fieldPosition="0" type="normal">
<references count="1">
<reference field="4294967294" selected="0">
<x v="0"/>
</reference>
</references>
</pivotArea>
</pivotAreas>
</conditionalFormat>
<conditionalFormat scope="data" priority="2">
<pivotAreas>
<pivotArea dataOnly="1" outline="0" fieldPosition="0" type="normal">
<references count="1">
<reference field="4294967294" selected="0">
<x v="1"/>
</reference>
</references>
</pivotArea>
</pivotAreas>
</conditionalFormat>
</conditionalFormats>
"""
diff = compare_xml(xml, expected)
> assert diff is None, diff
E AssertionError: Expected:
E <conditionalFormats count="2">
E <conditionalFormat priority="3" scope="data">
E <pivotAreas>
E <pivotArea dataOnly="1" fieldPosition="0" outline="0" type="normal">
E <references count="1">
E <reference field="4294967294" selected="0">
E <x v="0"></x>
E </reference>
E </references>
E </pivotArea>
E </pivotAreas>
E </conditionalFormat>
E <conditionalFormat priority="2" scope="data">
E <pivotAreas>
E <pivotArea dataOnly="1" fieldPosition="0" outline="0" type="normal">
E <references count="1">
E <reference field="4294967294" selected="0">
E <x v="1"></x>
E </reference>
E </references>
E </pivotArea>
E </pivotAreas>
E </conditionalFormat>
E </conditionalFormats>
E
E Got:
E <conditionalFormats count="2">
E <conditionalFormat priority="1" scope="data">
E <pivotAreas>
E <pivotArea dataOnly="1" fieldPosition="0" outline="0" type="normal">
E <references count="1">
E <reference field="4294967294" selected="0">
E <x v="1"></x>
E </reference>
E </references>
E </pivotArea>
E </pivotAreas>
E </conditionalFormat>
E <conditionalFormat priority="3" scope="data">
E <pivotAreas>
E <pivotArea dataOnly="1" fieldPosition="0" outline="0" type="normal">
E <references count="1">
E <reference field="4294967294" selected="0">
E <x v="0"></x>
E </reference>
E </references>
E </pivotArea>
E </pivotAreas>
E </conditionalFormat>
E </conditionalFormats>
E
E Diff:
E <conditionalFormats count="2">
E <conditionalFormat priority="3 (got: 1)" scope="data">
E <pivotAreas>
E <pivotArea dataOnly="1" fieldPosition="0" outline="0" type="normal">
E <references count="1">
E <reference field="4294967294" selected="0">
E <x v="0 (got: 1)"></x>
E </reference>
E </references>
E </pivotArea>
E </pivotAreas>
E </conditionalFormat>
E <conditionalFormat priority="2 (got: 3)" scope="data">
E <pivotAreas>
E <pivotArea dataOnly="1" fieldPosition="0" outline="0" type="normal">
E <references count="1">
E <reference field="4294967294" selected="0">
E <x v="1 (got: 0)"></x>
E </reference>
E </references>
E </pivotArea>
E </pivotAreas>
E </conditionalFormat>
E </conditionalFormats>
E
E assert 'Expected:\n <conditionalFormats count="2">\n <conditionalFormat priority="3" scope="data">\n <pivotAreas>\n ... </references>\n </pivotArea>\n </pivotAreas>\n </conditionalFormat>\n </conditionalFormats>\n' is None
ConditionalFormatList = <class 'openpyxl.pivot.table.ConditionalFormatList'>
diff = 'Expected:\n <conditionalFormats count="2">\n <conditionalFormat priority="3" scope="data">\n <pivotAreas>\n ... </references>\n </pivotArea>\n </pivotAreas>\n </conditionalFormat>\n </conditionalFormats>\n'
expected = '\n <conditionalFormats count="2">\n <conditionalFormat scope="data" priority="3">\n <pivotAreas>...\n </pivotArea>\n </pivotAreas>\n </conditionalFormat>\n </conditionalFormats>\n '
fmts = <openpyxl.pivot.table.ConditionalFormatList object>
Parameters:
count=2, conditionalFormat=[<openpyxl.pivot.table.Cond... stdDevPSubtotal=None, varSubtotal=None, varPSubtotal=None, x=[<openpyxl.pivot.fields.Index object>
Parameters:
v=0]]]]
node = <Element conditionalFormats at 0x7f4606aa7400>
self = <openpyxl.pivot.tests.test_table.TestConditionalFormatList object at 0x7f46078e99d0>
src = '\n <conditionalFormats count="3">\n <conditionalFormat scope="data" priority="3">\n <pivotArea... </pivotArea>\n </pivotAreas>\n </conditionalFormat>\n </conditionalFormats>\n '
xml = b'<conditionalFormats count="2"><conditionalFormat scope="data" priority="1"><pivotAreas><pivotArea type="normal" data...94" selected="0"><x v="0"/></reference></references></pivotArea></pivotAreas></conditionalFormat></conditionalFormats>'
/home/tkloczko/rpmbuild/BUILD/openpyxl-3.1.2/openpyxl/pivot/tests/test_table.py:642: AssertionError
________________________________________________________________________________ test_write_custom_doc_props ________________________________________________________________________________
datadir = local('/home/tkloczko/rpmbuild/BUILD/openpyxl-3.1.2/openpyxl/tests/data')
@pytest.mark.xfail
def test_write_custom_doc_props(datadir):
datadir.join("reader").chdir()
wb = load_workbook('example_vba_and_no_custom_doc_props.xlsm')
assert len(wb.custom_doc_props) == 0
> wb.custom_doc_props.add("PropName1", "2020-08-24T20:19:22Z", "date")
E AttributeError: 'CustomPropertyList' object has no attribute 'add'
datadir = local('/home/tkloczko/rpmbuild/BUILD/openpyxl-3.1.2/openpyxl/tests/data')
wb = <openpyxl.workbook.workbook.Workbook object at 0x7f460673bfd0>
/home/tkloczko/rpmbuild/BUILD/openpyxl-3.1.2/openpyxl/tests/test_read_write_custom_doc_props.py:38: AttributeError
_______________________________________________________________________________ test_set_invalid_active_index _______________________________________________________________________________
Workbook = <class 'openpyxl.workbook.workbook.Workbook'>
@pytest.mark.xfail
def test_set_invalid_active_index(Workbook):
wb = Workbook()
with pytest.raises(ValueError):
> wb.active = 1
E Failed: DID NOT RAISE <class 'ValueError'>
Workbook = <class 'openpyxl.workbook.workbook.Workbook'>
wb = <openpyxl.workbook.workbook.Workbook object at 0x7f4606a1ae80>
/home/tkloczko/rpmbuild/BUILD/openpyxl-3.1.2/openpyxl/workbook/tests/test_workbook.py:110: Failed
================================================================================== short test summary info ==================================================================================
SKIPPED [8] conftest.py:44: Pandas must be installed
SKIPPED [1] openpyxl/compat/tests/test_compat.py:68: condition: sys.version_info[0]>=3
SKIPPED [1] conftest.py:19: PIL is installed
SKIPPED [4] conftest.py:24: defusedxml is required to guard against these vulnerabilities
XFAIL openpyxl/cell/tests/test_cell.py::test_timedelta
XFAIL openpyxl/drawing/tests/test_connector.py::TestConnectorShape::test_ctor
XFAIL openpyxl/drawing/tests/test_graphic.py::TestGroupShape::test_ctor
XFAIL openpyxl/drawing/tests/test_graphic.py::TestGroupShape::test_from_xml
XFAIL openpyxl/pivot/tests/test_table.py::TestPivotTableDefinition::test_formatted_fields
XFAIL openpyxl/pivot/tests/test_table.py::TestConditionalFormatList::test_dedupe
XFAIL openpyxl/tests/test_read_write_custom_doc_props.py::test_write_custom_doc_props
XFAIL openpyxl/workbook/tests/test_workbook.py::test_set_invalid_active_index
FAILED openpyxl/drawing/tests/test_drawing.py::TestDrawing::test_ctor - AttributeError: 'TestDrawing' object has no attribute 'drawing'
FAILED openpyxl/drawing/tests/test_drawing.py::TestDrawing::test_width - AttributeError: 'TestDrawing' object has no attribute 'drawing'
FAILED openpyxl/drawing/tests/test_drawing.py::TestDrawing::test_proportional_width - AttributeError: 'TestDrawing' object has no attribute 'drawing'
FAILED openpyxl/drawing/tests/test_drawing.py::TestDrawing::test_height - AttributeError: 'TestDrawing' object has no attribute 'drawing'
FAILED openpyxl/drawing/tests/test_drawing.py::TestDrawing::test_proportional_height - AttributeError: 'TestDrawing' object has no attribute 'drawing'
FAILED openpyxl/drawing/tests/test_drawing.py::TestDrawing::test_set_dimension - AttributeError: 'TestDrawing' object has no attribute 'drawing'
FAILED openpyxl/drawing/tests/test_drawing.py::TestDrawing::test_absolute_anchor - AttributeError: 'TestDrawing' object has no attribute 'drawing'
FAILED openpyxl/drawing/tests/test_drawing.py::TestDrawing::test_onecell_anchor - AttributeError: 'TestDrawing' object has no attribute 'drawing'
=================================================================== 8 failed, 2483 passed, 14 skipped, 8 xfailed in 9.68s ===================================================================
List of installed modules in build env:
Package Version
----------------------------- -----------
alabaster 0.7.16
attrs 23.2.0
Babel 2.14.0
build 1.1.1
charset-normalizer 3.3.2
click 8.1.7
cloudpickle 3.0.0
distro 1.9.0
dnf 4.19.0
docutils 0.20.1
editables 0.5
et_xmlfile 1.1.0
exceptiongroup 1.1.3
gpg 1.23.2
hatch-fancy-pypi-readme 24.1.0
hatch-vcs 0.4.0
hatchling 1.21.1
hypothesis 6.99.6
idna 3.6
imagesize 1.4.1
importlib_metadata 7.0.1
importlib_resources 6.3.1
incremental 22.10.0
iniconfig 2.0.0
installer 0.7.0
Jinja2 3.1.3
libdnf 0.73.0
lxml 5.1.0
markdown-it-py 3.0.0
MarkupSafe 2.1.3
mdit-py-plugins 0.4.0
mdurl 0.1.2
myst-parser 2.0.0
olefile 0.47
packaging 24.0
pathspec 0.12.1
pillow 10.2.0
pluggy 1.4.0
Pygments 2.17.2
pyproject_hooks 1.0.0
pytest 8.1.1
python-dateutil 2.9.0.post0
PyYAML 6.0.1
requests 2.31.0
setuptools 69.1.1
setuptools-scm 8.0.4
snowballstemmer 2.2.0
sortedcontainers 2.4.0
Sphinx 7.2.6
sphinx_rtd_theme 2.0.0
sphinxcontrib-applehelp 1.0.8
sphinxcontrib-devhelp 1.0.5
sphinxcontrib-htmlhelp 2.0.5
sphinxcontrib-jquery 4.1
sphinxcontrib-jsmath 1.0.1
sphinxcontrib-qthelp 1.0.7
sphinxcontrib-serializinghtml 1.1.10
sphinxcontrib-towncrier 0.4.0a0
tokenize_rt 5.2.0
tomli 2.0.1
towncrier 23.11.0
trove-classifiers 2024.3.13
typing_extensions 4.10.0
urllib3 1.26.18
wheel 0.43.0
zipp 3.17.0
zope.event 5.0
zope.interface 6.2
Please let me know if you need more details or want me to perform some diagnostics.