Skip to content

Commit c914f34

Browse files
Update test values (#313)
1 parent 36128f4 commit c914f34

File tree

2 files changed

+30
-28
lines changed

2 files changed

+30
-28
lines changed

pybliometrics/scopus/tests/test_AuthorRetrieval.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ def test_historical_identifier():
196196
assert_equal(standard.historical_identifier, None)
197197
expected = [35787230500, 36488127000, 54974425600, 55004143700,
198198
55004143800, 57057263700, 56641032000, 36747787600,
199-
57206217299, 57219840256]
199+
57206217299, 57219840256, 58343886400]
200200
assert_equal(enhanced.historical_identifier, expected)
201201

202202

pybliometrics/scopus/tests/test_SerialTitle.py

Lines changed: 29 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,27 @@
1111

1212

1313
# SoftwareX
14-
# sofwarex = SerialTitle("2352-7110", refresh=30, years="2019-2020")
15-
sofwarex = SerialTitle("2352-7110", refresh=30)
14+
# softwarex = SerialTitle("2352-7110", refresh=30, years="2019-2020")
15+
softwarex = SerialTitle("2352-7110", refresh=30)
1616
# OECD Economic Studies
1717
oecd = SerialTitle("0255-0822", refresh=30)
1818
# Neural Networks
1919
neural_networks = SerialTitle('1879-2782', view='CITESCORE')
2020

2121

2222
def test_aggregation_type():
23-
assert_equal(sofwarex.aggregation_type, "journal")
23+
assert_equal(softwarex.aggregation_type, "journal")
2424
assert_equal(oecd.aggregation_type, "journal")
2525

2626

2727
def test_citescoreyearinfolist():
2828
info_fields = 'year citescore'
2929
info = namedtuple('Citescoreinfolist', info_fields)
3030

31-
# Test sofwarex
32-
expected_named_tuple = [info(year=2022, citescore=5.1), None]
33-
assert_equal(sofwarex.citescoreyearinfolist, expected_named_tuple)
31+
# Test softwarex
32+
expected_named_tuple = [info(year=2022, citescore=5.1),
33+
info(year=2023, citescore=4.9)]
34+
assert_equal(softwarex.citescoreyearinfolist, expected_named_tuple)
3435

3536
# Test oecd
3637
assert_equal(oecd.citescoreyearinfolist[0], None)
@@ -43,85 +44,86 @@ def test_citescoreyearinfolist():
4344

4445

4546
def test_eissn():
46-
assert_equal(sofwarex.eissn, "2352-7110")
47+
assert_equal(softwarex.eissn, "2352-7110")
4748
assert_equal(oecd.eissn, "1609-7491")
4849

4950

5051
def test_issn():
51-
assert_equal(sofwarex.issn, None)
52+
assert_equal(softwarex.issn, None)
5253
assert_equal(oecd.issn, "0255-0822")
5354

5455

5556
def test_oaallowsauthorpaid():
56-
assert_equal(sofwarex.oaallowsauthorpaid, None)
57+
assert_equal(softwarex.oaallowsauthorpaid, None)
5758
assert_equal(oecd.oaallowsauthorpaid, None)
5859

5960

6061
def test_openaccess():
61-
assert_equal(sofwarex.openaccess, 1)
62+
assert_equal(softwarex.openaccess, 1)
6263
assert_equal(oecd.openaccess, None)
6364

6465

6566
def test_openaccessstartdate():
66-
assert_equal(sofwarex.openaccessstartdate, None)
67+
assert_equal(softwarex.openaccessstartdate, None)
6768
assert_equal(oecd.openaccessstartdate, None)
6869

6970

7071
def test_openaccesstype():
71-
assert_equal(sofwarex.openaccesstype, None)
72+
assert_equal(softwarex.openaccesstype, None)
7273
assert_equal(oecd.openaccesstype, None)
7374

7475

7576
def test_openaccessarticle():
76-
assert_equal(sofwarex.openaccessarticle, True)
77+
assert_equal(softwarex.openaccessarticle, True)
7778
assert_equal(oecd.openaccessarticle, None)
7879

7980

8081
def test_openarchivearticle():
81-
assert_equal(sofwarex.openarchivearticle, None)
82+
assert_equal(softwarex.openarchivearticle, None)
8283
assert_equal(oecd.openarchivearticle, None)
8384

8485

8586
def test_openaccesssponsorname():
86-
assert_equal(sofwarex.openaccesssponsorname, None)
87+
assert_equal(softwarex.openaccesssponsorname, None)
8788
assert_equal(oecd.openaccesssponsorname, None)
8889

8990

9091
def test_openaccessuserlicense():
91-
assert_equal(sofwarex.openaccessuserlicense, None)
92+
assert_equal(softwarex.openaccessuserlicense, None)
9293
assert_equal(oecd.openaccessuserlicense, None)
9394

9495

9596
def test_publisher():
96-
assert_equal(sofwarex.publisher, "Elsevier BV")
97+
assert_equal(softwarex.publisher, "Elsevier BV")
9798
assert_equal(oecd.publisher, "OECD")
9899

99100

100101
def test_scopus_source_link():
101102
expected1 = "https://www.scopus.com/source/sourceInfo.url?sourceId=21100422153"
102-
assert_equal(sofwarex.scopus_source_link, expected1)
103+
assert_equal(softwarex.scopus_source_link, expected1)
103104
expected2 = "https://www.scopus.com/source/sourceInfo.url?sourceId=24107"
104105
assert_equal(oecd.scopus_source_link, expected2)
105106

106107

107108
def test_self_link():
108109
expected1 = "https://api.elsevier.com/content/serial/title/issn/23527110"
109-
assert_equal(sofwarex.self_link, expected1)
110+
assert_equal(softwarex.self_link, expected1)
110111
expected2 = "https://api.elsevier.com/content/serial/title/issn/02550822"
111112
assert_equal(oecd.self_link, expected2)
112113

114+
113115
def test_sjrlist():
114-
assert_equal(sofwarex.sjrlist, [(2022, 0.574)])
116+
assert_equal(softwarex.sjrlist, [(2022, 0.574)])
115117
assert_equal(oecd.sjrlist, [(1999, 2.723)])
116118

117119

118120
def test_sniplist():
119-
assert_equal(sofwarex.sniplist, [(2022, 1.426)])
121+
assert_equal(softwarex.sniplist, [(2022, 1.426)])
120122
assert_equal(oecd.sniplist, None)
121123

122124

123125
def test_source_id():
124-
assert_equal(sofwarex.source_id, 21100422153)
126+
assert_equal(softwarex.source_id, 21100422153)
125127
assert_equal(oecd.source_id, 24107)
126128

127129

@@ -131,28 +133,28 @@ def test_subject_area():
131133
area(area='Software', abbreviation='COMP', code=1712),
132134
area(area='Computer Science Applications', abbreviation='COMP', code=1706)
133135
]
134-
assert_equal(sofwarex.subject_area, expected1)
136+
assert_equal(softwarex.subject_area, expected1)
135137
expected2 = [
136138
area(area='Geography, Planning and Development', abbreviation='SOCI', code=3305)
137139
]
138140
assert_equal(oecd.subject_area, expected2)
139141

140142

141143
def test_title():
142-
assert_equal(sofwarex.title, "SoftwareX")
144+
assert_equal(softwarex.title, "SoftwareX")
143145
assert_equal(oecd.title, "OECD Economic Studies")
144146

145147

146148
def test_yearly_data():
147-
assert_true(type(sofwarex.yearly_data) == list)
148-
assert_equal(len(sofwarex.yearly_data), 28)
149+
assert_true(type(softwarex.yearly_data) == list)
150+
assert_equal(len(softwarex.yearly_data), 28)
149151
fields = 'year publicationcount revpercent zerocitessce '\
150152
'zerocitespercentsce citecountsce'
151153
dat = namedtuple('Yearlydata', fields)
152154
expected1_2020 = dat(year=2020, publicationcount=164, revpercent=0.0,
153155
zerocitessce=10, zerocitespercentsce=6.097560975609756,
154156
citecountsce=2571)
155-
assert_equal(sofwarex.yearly_data[24], expected1_2020)
157+
assert_equal(softwarex.yearly_data[24], expected1_2020)
156158
expected2_1996 = dat(year=1996, publicationcount=4, revpercent=0.0,
157159
zerocitessce=0, zerocitespercentsce=0, citecountsce=33)
158160
assert_equal(oecd.yearly_data[0], expected2_1996)

0 commit comments

Comments
 (0)