def test_counting_column_widths(self):
     table = TestCaseTable(None)
     table.set_header(['test cases', 'col header', 'short'])
     assert_equal(ColumnAligner(18, table)._widths, [18, 10, 5])
     test = table.add('A test')
     test.add_step(['Some kw', 'a longer arg', 'another']    )
     assert_equal(ColumnAligner(18, table)._widths, [18, 10, 12, 7])
Пример #2
0
 def test_aligned_header_cells_are_not_escaped(self):
     table = TestCaseTable(None)
     table.set_header(['test case', 'cus  tom', 'header'])
     table.add('Test case with a long name').add_step(
         ['keyword here', 'args'])
     assert_equals(self._formatter.format_header(table),
                   ['*** test case *** ', 'cus \\ tom   ', 'header'])
Пример #3
0
 def test_counting_column_widths(self):
     table = TestCaseTable(None)
     table.set_header(['test cases', 'col header', 'short'])
     assert_equals(ColumnAligner(18, table)._widths, [18, 10, 5])
     test = table.add('A test')
     test.add_step(['Some kw', 'a longer arg', 'another'])
     assert_equals(ColumnAligner(18, table)._widths, [18, 10, 12, 7])
Пример #4
0
 def test_counting_column_widths(self):
     table = TestCaseTable(None)
     table.set_header(["test cases", "col header", "short"])
     assert_equals(ColumnAligner(18, table)._widths, [18, 10, 5])
     test = table.add("A test")
     test.add_step(["Some kw", "a longer arg", "another"])
     assert_equals(ColumnAligner(18, table)._widths, [18, 10, 12, 7])
def create_test_case_file():
    data = TestCaseFile(source='foo.txt')
    table = TestCaseTable(data)
    data.testcase_table = table
    table.set_header(['test case', 'some', 'and other'])
    test = table.add('A test')
    test.add_step(['A kw', 'an arg'])
    return data
Пример #6
0
def create_test_case_file():
    data = TestCaseFile(source="foo.txt")
    table = TestCaseTable(data)
    data.testcase_table = table
    table.set_header(["test case", "some", "and other"])
    test = table.add("A test")
    test.add_step(["A kw", "an arg"])
    return data
Пример #7
0
def create_test_case_file():
    data = TestCaseFile(source='foo.txt')
    table = TestCaseTable(data)
    data.testcase_table = table
    table.set_header(['test case', 'some', 'and other'])
    test = table.add('A test')
    test.add_step(['A kw', 'an arg'])
    return data
Пример #8
0
 def _create_test_table(self, additional_headers=()):
     table = TestCaseTable(None)
     table.set_header(['Test Cases'] + list(additional_headers))
     return table
 def test_aligned_header_cells_are_not_escaped(self):
     table = TestCaseTable(None)
     table.set_header(['test case', 'cus  tom',  'header'])
     table.add('Test case with a long name').add_step(['keyword here', 'args'])
     assert_equal(self._formatter.format_header(table),
                  ['*** test case *** ', 'cus \\ tom   ', 'header'])
 def _create_test_table(self, additional_headers=()):
     table = TestCaseTable(None)
     table.set_header(['Test Cases'] + list(additional_headers))
     return table