You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ref_line=u'[32] E. Armengaud, et al., JINST 10(05), P05007 (2015). doi:10.1088/1748-0221/10/05/P05007.'
213
+
res=get_references(ref_line)
214
+
references=res[0]
215
+
expected= [
216
+
{
217
+
'author': [u'E. Armengaud, et al.'],
218
+
'doi': [u'doi:10.1088/1748-0221/10/05/P05007'],
219
+
'journal_page': [u'P05007'],
220
+
'journal_reference': [u'JINST 10 (2015) P05007'],
221
+
'journal_title': [u'JINST'],
222
+
'journal_volume': [u'10'],
223
+
'journal_year': [u'2015'],
224
+
'linemarker': [u'32'],
225
+
'raw_ref': [ref_line],
226
+
'year': [u'2015'],
227
+
}
228
+
]
229
+
assertreferences==expected
230
+
231
+
232
+
deftest_doi_5_digit_multi():
233
+
ref_line=u'38 R. Aaij et al. (LHCb Collaboration), "Measurement of charged particle multiplicities in pp collisions at ps = 7 TeV in the forward region", Eur. Phys. J. C (2012) 72: 1947. DOI: 10.1140/epjc/s10052-012-1947-8. HepData DOI: 10.17182/hepdata.65435.'
234
+
res=get_references(ref_line)
235
+
references=res[0]
236
+
expected= [
237
+
{
238
+
'author': [u'R. Aaij et al.'],
239
+
'misc': [u'(LHCb Collaboration)'],
240
+
'title': [u'Measurement of charged particle multiplicities in pp collisions at ps = 7 TeV in the forward region'],
241
+
'doi': [u'doi:10.1140/epjc/s10052-012-1947-8'],
242
+
'journal_page': [u'1947'],
243
+
'journal_reference': [u'Eur. Phys. J. C 72 (2012) 1947'],
244
+
'journal_title': [u'Eur. Phys. J. C'],
245
+
'journal_volume': [u'72'],
246
+
'journal_year': [u'2012'],
247
+
'linemarker': [u'38'],
248
+
'year': [u'2012'],
249
+
'raw_ref': [ref_line],
250
+
},
251
+
{
252
+
'misc': [u'HepData'],
253
+
'doi': [u'doi:10.17182/hepdata.65435'],
254
+
'linemarker': [u'38'],
255
+
'raw_ref': [ref_line],
256
+
}
257
+
]
258
+
assertreferences==expected
259
+
260
+
261
+
deftest_doi_subdivisions():
262
+
ref_line=u'[10] A. Smith et al., "Introduction to Particle Physics", 2017, Springer Publishing, ISBN: 97881925212214, DOI: 10.978.819252/12214.'
0 commit comments