def test_write_sheet_views7(self):

        self.worksheet.select()

        # Should be the same as 'A2'
        self.worksheet.set_selection('A2:A2')

        self.worksheet._write_sheet_views()

        exp = '<sheetViews><sheetView tabSelected="1" workbookViewId="0"><selection activeCell="A2" sqref="A2"/></sheetView></sheetViews>'
        got = self.fh.getvalue()

        self.assertEqual(got, exp)
Test the _write_sheet_views() method with selection set
dataset/ETHPy150Open jmcnamara/XlsxWriter/xlsxwriter/test/worksheet/test_write_sheet_views5.py/TestWriteSheetViews.test_write_sheet_views7