Python pygments.util.duplicates_removed() Examples
The following are 2
code examples of pygments.util.duplicates_removed().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
pygments.util
, or try the search function
.
Example #1
Source File: test_util.py From pygments with BSD 2-Clause "Simplified" License | 5 votes |
def test_duplicates_removed_seq_types(): # tuple x = util.duplicates_removed(('a', 'a', 'b')) assert ['a', 'b'] == x # list x = util.duplicates_removed(['a', 'a', 'b']) assert ['a', 'b'] == x # iterator x = util.duplicates_removed(iter(('a', 'a', 'b'))) assert ['a', 'b'] == x
Example #2
Source File: test_util.py From pygments with BSD 2-Clause "Simplified" License | 5 votes |
def test_duplicates_removed_nonconsecutive(): # keeps first x = util.duplicates_removed(('a', 'b', 'a')) assert ['a', 'b'] == x