Skip to content

Commit

Permalink
tests: fix for repeatable subfields
Browse files Browse the repository at this point in the history
Signed-off-by: Jiri Kuncar <[email protected]>
  • Loading branch information
jirikuncar committed Jul 3, 2015
1 parent e53bc07 commit 9ef2e29
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/test_record.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ def test_accented_unicode_letterst_test(self):
</record>
'''
rec = marc21.do(create_record(xml))
assert rec['main_entry_personal_name']['personal_name'] == 'Döè1, John'
assert rec['title_statement']['title'] == 'Пушкин'
assert rec['main_entry_personal_name']['personal_name'][0] == 'Döè1, John'
assert rec['title_statement']['title'][0] == 'Пушкин'

def test_validate(self):
"""Record - Validate record."""
Expand Down Expand Up @@ -472,12 +472,12 @@ def test_rec_json_creation_from_marcxml(self):

assert 'main_entry_personal_name' in r
assert 'added_entry_personal_name' in r
assert r['main_entry_personal_name']['personal_name'] == "Efstathiou, G P"
assert r['main_entry_personal_name']['personal_name'] == ["Efstathiou, G P"]
assert len(r['added_entry_personal_name']) == 4
assert 'title_statement' in r
assert r['title_statement']['title'] == "Constraints on $\Omega_{\Lambda}$ and $\Omega_{m}$from Distant Type 1a Supernovae and Cosmic Microwave Background Anisotropies"
assert r['title_statement']['title'][0] == "Constraints on $\Omega_{\Lambda}$ and $\Omega_{m}$from Distant Type 1a Supernovae and Cosmic Microwave Background Anisotropies"
assert 'summary' in r
assert r['summary'][0]['summary'] == "We perform a combined likelihood analysis of the latest cosmic microwave background anisotropy data and distant Type 1a Supernova data of Perlmutter etal (1998a). Our analysis is restricted tocosmological models where structure forms from adiabatic initial fluctuations characterised by a power-law spectrum with negligible tensor component. Marginalizing over other parameters, our bestfit solution gives Omega_m = 0.25 (+0.18, -0.12) and Omega_Lambda = 0.63 (+0.17, -0.23) (95 % confidence errors) for the cosmic densities contributed by matter and a cosmological constantrespectively. The results therefore strongly favour a nearly spatially flat Universe with a non-zero cosmological constant."
assert r['summary'][0]['summary'][0] == "We perform a combined likelihood analysis of the latest cosmic microwave background anisotropy data and distant Type 1a Supernova data of Perlmutter etal (1998a). Our analysis is restricted tocosmological models where structure forms from adiabatic initial fluctuations characterised by a power-law spectrum with negligible tensor component. Marginalizing over other parameters, our bestfit solution gives Omega_m = 0.25 (+0.18, -0.12) and Omega_Lambda = 0.63 (+0.17, -0.23) (95 % confidence errors) for the cosmic densities contributed by matter and a cosmological constantrespectively. The results therefore strongly favour a nearly spatially flat Universe with a non-zero cosmological constant."

# self.assertTrue('reference' in r)
# self.assertEquals(len(r['reference']), 36)
Expand Down

0 comments on commit 9ef2e29

Please sign in to comment.