All Downloads are FREE. Search and download functionalities are using the official Maven repository.

robotframework-2.7.7.utest.writer.test_aligners.py Maven / Gradle / Ivy

The newest version!
import unittest

from robot.parsing.model import TestCaseTable
from robot.utils.asserts import assert_equals
from robot.writer.aligners import ColumnAligner


class TestColumnAligner(unittest.TestCase):

    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])




© 2015 - 2024 Weber Informatics LLC | Privacy Policy