Skip to content

Commit

Permalink
format: add border color test
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcnamara committed Aug 2, 2024
1 parent b4102b6 commit b3ede7b
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 1 deletion.
2 changes: 1 addition & 1 deletion dev/docs/source/working_with_macros.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ This section explains how to add a VBA file containing functions or macros to an
The Excel XLSM file format
--------------------------

An Excel ``xlsm`` file is exactly the same as an ``xlsx`` file except that is
An Excel ``xlsm`` file is exactly the same as an ``xlsx`` file except that it
contains an additional ``vbaProject.bin`` file which contains functions and/or
macros. Excel uses a different extension to differentiate between the two file
formats since files containing macros are usually subject to additional
Expand Down
41 changes: 41 additions & 0 deletions xlsxwriter/test/comparison/test_format25.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
###############################################################################
#
# Tests for XlsxWriter.
#
# SPDX-License-Identifier: BSD-2-Clause
# Copyright (c), 2013-2024, John McNamara, [email protected]
#

from ..excel_comparison_test import ExcelComparisonTest
from ...workbook import Workbook


class TestCompareXLSXFiles(ExcelComparisonTest):
"""
Test file created by XlsxWriter against a file created by Excel.
"""

def setUp(self):

self.set_filename("format25.xlsx")

def test_create_file(self):
"""Test the creation of a simple XlsxWriter file with automatic color."""

workbook = Workbook(self.got_filename)

worksheet = workbook.add_worksheet()

format1 = workbook.add_format(
{
"border_color": "#FF9966",
"border": 1,
}
)

worksheet.write(2, 2, "", format1)

workbook.close()

self.assertExcelEqual()
Binary file not shown.

0 comments on commit b3ede7b

Please sign in to comment.