Example #1
0
def get_citations(texfilenames):
    """
    Get all citations in tex files
    Citations appear only once.

    :param texfilenames: tex files path
    :returns: a list of citations
    """
    allcite = []
    for texfilename in texfilenames:
        allcite.extend(_get_citations(texfilename))
    #uniqify the list
    #A set could not be used since the order might have a sense
    allcite = uniq(allcite)
    return allcite
Example #2
0
def get_citations(texfilenames):
    """
    Get all citations in tex files
    Citations appear only once.

    :param texfilenames: tex files path
    :returns: a list of citations
    """
    allcite = []
    for texfilename in texfilenames:
        allcite.extend(_get_citations(texfilename))
    #uniqify the list
    #A set could not be used since the order might have a sense
    allcite = uniq(allcite)
    return allcite
Example #3
0
 def test_complete_list(self):
     data = ['a', 'b', 'c', 'b']
     expected = ['a', 'b', 'c']
     result = uniq(data)
     self.assertEqual(expected, result)
Example #4
0
 def test_simple_list(self):
     data = ['a', 'b', 'c']
     expected = data
     result = uniq(data)
     self.assertEqual(expected, result)
Example #5
0
 def test_complete_list(self):
     data = ['a', 'b', 'c', 'b']
     expected = ['a', 'b', 'c']
     result = uniq(data)
     self.assertEqual(expected, result)
Example #6
0
 def test_simple_list(self):
     data = ['a', 'b', 'c']
     expected = data
     result = uniq(data)
     self.assertEqual(expected, result)