Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
limbra
limbra
Commits
a79e38ca
Commit
a79e38ca
authored
Jun 07, 2017
by
LE GAC Renaud
Browse files
Remove tests for the obsolete module author_iterators.
parent
7318fcce
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
84 deletions
+0
-84
tests/invenio_tools/author_iterators/test_author_cds1951625.py
.../invenio_tools/author_iterators/test_author_cds1951625.py
+0
-84
No files found.
tests/invenio_tools/author_iterators/test_author_cds1951625.py
deleted
100644 → 0
View file @
7318fcce
# -*- coding: utf-8 -*-
"""ARTICLE
http://cds.cern.ch/record/1951625.
Precision luminosity measurements at LHCb,
J. Instrum. 9 (2014) P12005
arXiv:1410.0149
704 authors
Note:
* The first author is not in the author list
* LHCb collaboration
* The publication year is a list (duplicate 773y)
* The submitted date is not formatted: 01 Oct 2014
"""
import
itertools
import
pytest
from
invenio_tools
import
(
iter_author_affiliations
,
iter_author_affiliation_keys
,
iter_author_fields
,
iter_author_items
,
iter_author_names
,
load_record
)
@
pytest
.
fixture
(
scope
=
"module"
)
def
record
():
return
load_record
(
'cds.cern.ch'
,
1951625
)
def
test_iter_affiliations
(
record
):
assert
type
(
iter_author_affiliations
(
record
))
==
itertools
.
imap
def
test_iter_affiliation_keys
(
record
):
assert
type
(
iter_author_affiliation_keys
(
record
))
==
itertools
.
imap
def
test_iter_author_fields
(
record
):
assert
type
(
iter_author_fields
(
record
))
==
itertools
.
chain
def
test_iter_author_names
(
record
):
assert
type
(
iter_author_names
(
record
))
==
itertools
.
imap
def
test_affiliations
(
record
):
affiliations
=
list
(
iter_author_affiliations
(
record
))
assert
len
(
affiliations
)
==
704
assert
affiliations
[
0
]
==
(
"NIKHEF, Amsterdam"
,)
assert
affiliations
[
-
8
]
==
(
u
"Heidelberg, Max Planck Inst."
,
u
"Lebedev Inst."
)
def
test_affiliation_keys
(
record
):
keys
=
[
tuple
(
el
)
for
el
in
iter_author_affiliation_keys
(
record
)]
assert
len
(
keys
)
==
704
assert
keys
[
0
]
==
(
"NIKHEF, Amsterdam"
,)
assert
keys
[
-
8
]
==
(
u
"Heidelberg, Max Planck Inst."
,
u
"Lebedev Inst."
)
def
test_items
(
record
):
items
=
[(
el
[
0
],
tuple
(
el
[
1
]))
for
el
in
iter_author_items
(
record
)]
import
pprint
pprint
.
pprint
(
items
)
assert
len
(
items
)
==
704
assert
items
[
0
]
==
(
u
'Aaij, Roel'
,
(
u
'NIKHEF, Amsterdam'
,))
assert
items
[
-
8
]
==
(
u
'Zavertyaev, Mikhail'
,
(
u
'Heidelberg, Max Planck Inst.'
,
u
'Lebedev Inst.'
))
def
test_names
(
record
):
names
=
list
(
iter_author_names
(
record
))
assert
len
(
names
)
==
704
assert
names
[
0
]
==
"Aaij, Roel"
assert
names
[
1
]
==
"Adeva, Bernardo"
assert
names
[
344
]
==
"Le Gac, Renaud"
assert
names
[
-
1
]
==
"Zvyagin, Alexander"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment