How to use the idna.intranges._encode_range function in idna

To help you get started, we’ve selected a few idna examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github kjd / idna / tests / test_intranges.py View on Github external
def test_skips(self):
        self.assertEqual(
            intranges_from_list([0, 2, 4, 6, 9, 10, 11, 13, 15,]),
            (
                _encode_range(0, 1),
                _encode_range(2, 3),
                _encode_range(4, 5),
                _encode_range(6, 7),
                _encode_range(9, 12),
                _encode_range(13, 14),
                _encode_range(15, 16),
            )
github kjd / idna / tests / test_intranges.py View on Github external
def test_skips(self):
        self.assertEqual(
            intranges_from_list([0, 2, 4, 6, 9, 10, 11, 13, 15,]),
            (
                _encode_range(0, 1),
                _encode_range(2, 3),
                _encode_range(4, 5),
                _encode_range(6, 7),
                _encode_range(9, 12),
                _encode_range(13, 14),
                _encode_range(15, 16),
            )
github kjd / idna / tests / test_intranges.py View on Github external
def test_skips(self):
        self.assertEqual(
            intranges_from_list([0, 2, 4, 6, 9, 10, 11, 13, 15,]),
            (
                _encode_range(0, 1),
                _encode_range(2, 3),
                _encode_range(4, 5),
                _encode_range(6, 7),
                _encode_range(9, 12),
                _encode_range(13, 14),
                _encode_range(15, 16),
            )
github kjd / idna / tests / test_intranges.py View on Github external
def test_skips(self):
        self.assertEqual(
            intranges_from_list([0, 2, 4, 6, 9, 10, 11, 13, 15,]),
            (
                _encode_range(0, 1),
                _encode_range(2, 3),
                _encode_range(4, 5),
                _encode_range(6, 7),
                _encode_range(9, 12),
                _encode_range(13, 14),
                _encode_range(15, 16),
            )
github kjd / idna / tests / test_intranges.py View on Github external
def test_skips(self):
        self.assertEqual(
            intranges_from_list([0, 2, 4, 6, 9, 10, 11, 13, 15,]),
            (
                _encode_range(0, 1),
                _encode_range(2, 3),
                _encode_range(4, 5),
                _encode_range(6, 7),
                _encode_range(9, 12),
                _encode_range(13, 14),
                _encode_range(15, 16),
            )
github kjd / idna / tests / test_intranges.py View on Github external
def test_ranging(self):
        self.assertEqual(
            intranges_from_list(list(range(293, 499)) + list(range(4888, 9876))),
            (_encode_range(293, 499), _encode_range(4888, 9876),)
        )
github kjd / idna / tests / test_intranges.py View on Github external
def test_skips(self):
        self.assertEqual(
            intranges_from_list([0, 2, 4, 6, 9, 10, 11, 13, 15,]),
            (
                _encode_range(0, 1),
                _encode_range(2, 3),
                _encode_range(4, 5),
                _encode_range(6, 7),
                _encode_range(9, 12),
                _encode_range(13, 14),
                _encode_range(15, 16),
            )
github kjd / idna / tests / test_intranges.py View on Github external
def test_ranging_2(self):
        self.assertEqual(
            intranges_from_list([111]),
            (_encode_range(111, 112),)
        )
github kjd / idna / tests / test_intranges.py View on Github external
def test_skips(self):
        self.assertEqual(
            intranges_from_list([0, 2, 4, 6, 9, 10, 11, 13, 15,]),
            (
                _encode_range(0, 1),
                _encode_range(2, 3),
                _encode_range(4, 5),
                _encode_range(6, 7),
                _encode_range(9, 12),
                _encode_range(13, 14),
                _encode_range(15, 16),
            )