def test_write_page_margins_top(self):

        self.worksheet.set_margins(top=0.5)
        self.worksheet._write_page_margins()

        exp = """<pageMargins left="0.7" right="0.7" top="0.5" bottom="0.75" header="0.3" footer="0.3"/>"""
        got = self.fh.getvalue()

        self.assertEqual(got, exp)
Test the _write_page_margins() method with top margin
dataset/ETHPy150Open jmcnamara/XlsxWriter/xlsxwriter/test/worksheet/test_write_page_margins.py/TestWritePageMargins.test_write_page_margins_top