Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial working header/footer images.
- Loading branch information
Showing
29 changed files
with
917 additions
and
59 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
############################################################################### | ||
# | ||
# Tests for XlsxWriter. | ||
# | ||
# Copyright (c), 2013-2014, John McNamara, jmcnamara@cpan.org | ||
# | ||
|
||
from ..excel_comparsion_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.maxDiff = None | ||
|
||
filename = 'header_image01.xlsx' | ||
|
||
test_dir = 'xlsxwriter/test/comparison/' | ||
self.image_dir = test_dir + 'images/' | ||
self.got_filename = test_dir + '_test_' + filename | ||
self.exp_filename = test_dir + 'xlsx_files/' + filename | ||
|
||
self.ignore_files = [] | ||
self.ignore_elements = {} | ||
|
||
def test_create_file(self): | ||
"""Test the creation of a simple XlsxWriter file with image(s).""" | ||
|
||
workbook = Workbook(self.got_filename) | ||
|
||
worksheet = workbook.add_worksheet() | ||
|
||
worksheet.set_header('&L&G', None, | ||
{'image_left': self.image_dir + 'red.jpg'}) | ||
|
||
workbook.close() | ||
|
||
self.assertExcelEqual() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
############################################################################### | ||
# | ||
# Tests for XlsxWriter. | ||
# | ||
# Copyright (c), 2013-2014, John McNamara, jmcnamara@cpan.org | ||
# | ||
|
||
from ..excel_comparsion_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.maxDiff = None | ||
|
||
filename = 'header_image02.xlsx' | ||
|
||
test_dir = 'xlsxwriter/test/comparison/' | ||
self.image_dir = test_dir + 'images/' | ||
self.got_filename = test_dir + '_test_' + filename | ||
self.exp_filename = test_dir + 'xlsx_files/' + filename | ||
|
||
self.ignore_files = [] | ||
self.ignore_elements = {} | ||
|
||
def test_create_file(self): | ||
"""Test the creation of a simple XlsxWriter file with image(s).""" | ||
|
||
workbook = Workbook(self.got_filename) | ||
|
||
worksheet = workbook.add_worksheet() | ||
|
||
worksheet.set_header('&L&G&C&G', None, | ||
{'image_left': self.image_dir + 'red.jpg', | ||
'image_center': self.image_dir + 'blue.jpg'}) | ||
|
||
workbook.close() | ||
|
||
self.assertExcelEqual() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
############################################################################### | ||
# | ||
# Tests for XlsxWriter. | ||
# | ||
# Copyright (c), 2013-2014, John McNamara, jmcnamara@cpan.org | ||
# | ||
|
||
from ..excel_comparsion_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.maxDiff = None | ||
|
||
filename = 'header_image03.xlsx' | ||
|
||
test_dir = 'xlsxwriter/test/comparison/' | ||
self.image_dir = test_dir + 'images/' | ||
self.got_filename = test_dir + '_test_' + filename | ||
self.exp_filename = test_dir + 'xlsx_files/' + filename | ||
|
||
self.ignore_files = [] | ||
self.ignore_elements = {} | ||
|
||
def test_create_file(self): | ||
"""Test the creation of a simple XlsxWriter file with image(s).""" | ||
|
||
workbook = Workbook(self.got_filename) | ||
|
||
worksheet = workbook.add_worksheet() | ||
|
||
worksheet.set_header('&L&G&C&G&R&G', None, | ||
{'image_left': self.image_dir + 'red.jpg', | ||
'image_center': self.image_dir + 'blue.jpg', | ||
'image_right': self.image_dir + 'yellow.jpg'}) | ||
|
||
workbook.close() | ||
|
||
self.assertExcelEqual() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
############################################################################### | ||
# | ||
# Tests for XlsxWriter. | ||
# | ||
# Copyright (c), 2013-2014, John McNamara, jmcnamara@cpan.org | ||
# | ||
|
||
from ..excel_comparsion_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.maxDiff = None | ||
|
||
filename = 'header_image04.xlsx' | ||
|
||
test_dir = 'xlsxwriter/test/comparison/' | ||
self.image_dir = test_dir + 'images/' | ||
self.got_filename = test_dir + '_test_' + filename | ||
self.exp_filename = test_dir + 'xlsx_files/' + filename | ||
|
||
self.ignore_files = [] | ||
self.ignore_elements = {} | ||
|
||
def test_create_file(self): | ||
"""Test the creation of a simple XlsxWriter file with image(s).""" | ||
|
||
workbook = Workbook(self.got_filename) | ||
|
||
worksheet = workbook.add_worksheet() | ||
|
||
worksheet.set_footer('&L&G&C&G&R&G', None, | ||
{'image_left': self.image_dir + 'red.jpg', | ||
'image_center': self.image_dir + 'blue.jpg', | ||
'image_right': self.image_dir + 'yellow.jpg'}) | ||
|
||
workbook.close() | ||
|
||
self.assertExcelEqual() |
Oops, something went wrong.