aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/PyHamcrest/tests/test_string_description.py
blob: 40cbdd226eb7b1400ac03eae34a34bc6c0e63d83 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from hamcrest import assert_that, empty, equal_to

__author__ = 'asatarin@yandex-team.ru'


def test_string_description_is_fast():
    list_of_very_long_strings = ["aa"*1000 for _ in range(10000)]
    try:
        assert_that(list_of_very_long_strings, empty())
        x = 0
    except AssertionError as e:
        x = len(str(e))

    assert_that(x, equal_to(20040048))