Exemplo n.º 1
0
 def test_short_list(self):
     authors = ['Foo, J', 'Bar, R', 'Foobar, D']
     expected = 'J. Foo \\textit{et al.}'
     result = get_authors(authors, 1)
     self.assertEqual(expected, result)
Exemplo n.º 2
0
 def test_two_authors(self):
     authors = ['Foo, J', 'Bar, R']
     expected = 'J. Foo and R. Bar'
     result = get_authors(authors)
     self.assertEqual(expected, result)
Exemplo n.º 3
0
 def test_simple_list(self):
     authors = ['Foo, J', 'Bar, R', 'Foobar, D']
     expected = 'J. Foo, R. Bar and D. Foobar'
     result = get_authors(authors)
     self.assertEqual(expected, result)
Exemplo n.º 4
0
 def test_one_author(self):
     authors = ['Foo, J']
     expected = 'J. Foo'
     result = get_authors(authors)
     self.assertEqual(expected, result)