Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_tab_left_leftalt(self):
options = domdiv.parse_opts(
['--tab_name_align', 'left', '--tab_side',
'left-alternate'])
self.assertEquals(options.tab_name_align, 'left')
self.assertEquals(options.tab_side, 'left-alternate')
domdiv.calculate_layout(options)
self.assertEquals(options.tab_name_align, 'left')
self.assertEquals(options.tab_side, 'left-alternate')
def test_text_blank_blank(self):
options = domdiv.parse_opts(
['--front', 'blank', '--back', 'blank'])
self.assertEquals(options.text_front, 'blank')
self.assertEquals(options.text_back, 'blank')
def test_tab_left_right(self):
options = domdiv.parse_opts(
['--tab_name_align', 'left', '--tab_side', 'right'])
self.assertEquals(options.tab_name_align, 'left')
self.assertEquals(options.tab_side, 'right')
domdiv.calculate_layout(options)
self.assertEquals(options.tab_name_align, 'left')
self.assertEquals(options.tab_side, 'right')
def test_text_rules_card(self):
options = domdiv.parse_opts(
['--front', 'rules', '--back', 'card'])
self.assertEquals(options.text_front, 'rules')
self.assertEquals(options.text_back, 'card')
def test_tab_right_full(self):
options = domdiv.parse_opts(
['--tab_name_align', 'right', '--tab_side', 'full'])
self.assertEquals(options.tab_name_align, 'right')
self.assertEquals(options.tab_side, 'full')
domdiv.calculate_layout(options)
self.assertEquals(options.tab_name_align, 'right')
self.assertEquals(options.tab_side, 'full')
def test_tab_centre_leftalt(self):
options = domdiv.parse_opts(
['--tab_name_align', 'centre', '--tab_side',
'left-alternate'])
self.assertEquals(options.tab_name_align, 'centre')
self.assertEquals(options.tab_side, 'left-alternate')
domdiv.calculate_layout(options)
self.assertEquals(options.tab_name_align, 'centre')
self.assertEquals(options.tab_side, 'left-alternate')
def test_tab_centre_right(self):
options = domdiv.parse_opts(['--tab_name_align',
'centre', '--tab_side', 'right'])
self.assertEquals(options.tab_name_align, 'centre')
self.assertEquals(options.tab_side, 'right')
domdiv.calculate_layout(options)
self.assertEquals(options.tab_name_align, 'centre')
self.assertEquals(options.tab_side, 'right')
def test_tab_edge_left(self):
options = domdiv.parse_opts(
['--tab_name_align', 'edge', '--tab_side', 'left'])
self.assertEquals(options.tab_name_align, 'edge')
self.assertEquals(options.tab_side, 'left')
domdiv.calculate_layout(options)
self.assertEquals(options.tab_name_align, 'edge')
self.assertEquals(options.tab_side, 'left')
def test_tab_left_full(self):
options = domdiv.parse_opts(
['--tab_name_align', 'left', '--tab_side', 'full'])
self.assertEquals(options.tab_name_align, 'left')
self.assertEquals(options.tab_side, 'full')
domdiv.calculate_layout(options)
self.assertEquals(options.tab_name_align, 'left')
self.assertEquals(options.tab_side, 'full')
def test_tab_edge_rightalt(self):
options = domdiv.parse_opts(
['--tab_name_align', 'edge', '--tab_side',
'right-alternate'])
self.assertEquals(options.tab_name_align, 'edge')
self.assertEquals(options.tab_side, 'right-alternate')
domdiv.calculate_layout(options)
self.assertEquals(options.tab_name_align, 'edge')
self.assertEquals(options.tab_side, 'right-alternate')