Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MaxLength returns wrong length for unicode strings on Python 2.7 #649

Closed
onyxfish opened this issue Dec 23, 2016 · 0 comments
Closed

MaxLength returns wrong length for unicode strings on Python 2.7 #649

onyxfish opened this issue Dec 23, 2016 · 0 comments

Comments

@onyxfish
Copy link
Collaborator

Test:

    def test_max_length_unicode(self):
        rows = [
            ['a'],
            [u'👍'],
            ['w']
        ]

        table = Table(rows, ['test'], [Text()])
        MaxLength('test').validate(table)
        self.assertEqual(MaxLength('test').run(table), 1)
        self.assertIsInstance(MaxLength('test').run(table), Decimal)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant