Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 3
0
 def test_complete_list(self):
     data = ['a', 'b', 'c', 'b']
     expected = ['a', 'b', 'c']
     result = uniq(data)
     self.assertEqual(expected, result)
Exemplo n.º 4
0
 def test_simple_list(self):
     data = ['a', 'b', 'c']
     expected = data
     result = uniq(data)
     self.assertEqual(expected, result)
Exemplo n.º 5
0
 def test_complete_list(self):
     data = ['a', 'b', 'c', 'b']
     expected = ['a', 'b', 'c']
     result = uniq(data)
     self.assertEqual(expected, result)
Exemplo n.º 6
0
 def test_simple_list(self):
     data = ['a', 'b', 'c']
     expected = data
     result = uniq(data)
     self.assertEqual(expected, result)