[Bug 7702] New: Test for C4::Heading::MARC21 should only run under MARC21
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7702 Priority: P5 - low Change sponsored?: --- Bug ID: 7702 Assignee: gmcharlt@gmail.com Summary: Test for C4::Heading::MARC21 should only run under MARC21 QA Contact: koha.sekjal@gmail.com Severity: minor Classification: Unclassified OS: All Reporter: jcamins@cpbibliography.com Hardware: All Status: NEW Version: master Component: Test Suite Product: Koha At the moment, the test for C4::Heading::MARC21 will try to run under UNIMARC installations, resulting in an error. It should check which marcflavour is in use, and not run the MARC21 tests if UNIMARC is active. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7702 --- Comment #1 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- Created attachment 8158 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=8158&action=edit Bug 7702: MARC21 heading tests should not run under UNIMARC Skip the MARC21-specific tests in t/Heading_MARC21.t if the marcflavour is UNIMARC. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7702 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7702 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|gmcharlt@gmail.com |jcamins@cpbibliography.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7702 --- Comment #2 from Ian Walls <koha.sekjal@gmail.com> --- To be absolutely explicit, I'd recommend change the conditional from "if not UNIMARC" to "if MARC21 OR NORMARC", so if we later implement another form of MARC, we won't have to remember to adjust this. Ounce of prevention and all that.... -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7702 Magnus Enger <magnus@enger.priv.no> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #8158|0 |1 is obsolete| | --- Comment #3 from Magnus Enger <magnus@enger.priv.no> --- Created attachment 8605 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=8605&action=edit Bug 7702: MARC21 heading tests should not run under UNIMARC Skip the MARC21-specific tests in t/Heading_MARC21.t if the marcflavour is UNIMARC. Signed-off-by: Magnus Enger <magnus@enger.priv.no> I set marcflavour = UNIMARC for testing this. Before the patch, t/Heading_MARC21.t fails. After the patch it succeeds. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7702 Magnus Enger <magnus@enger.priv.no> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #8605|0 |1 is obsolete| | --- Comment #4 from Magnus Enger <magnus@enger.priv.no> --- Created attachment 8606 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=8606&action=edit Bug 7702: [SIGNED-OFF] MARC21 heading tests should not run under UNIMARC Skip the MARC21-specific tests in t/Heading_MARC21.t if the marcflavour is UNIMARC. Signed-off-by: Magnus Enger <magnus@enger.priv.no> I set marcflavour = UNIMARC for testing this. Before the patch, t/Heading_MARC21.t fails. After the patch it succeeds. Signed-off-by: Magnus Enger <magnus@enger.priv.no> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7702 Magnus Enger <magnus@enger.priv.no> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |magnus@enger.priv.no --- Comment #5 from Magnus Enger <magnus@enger.priv.no> --- $ t/Heading_MARC21.t 1..3 ok 1 - use C4::Heading; ok 2 - Display form generation not ok 3 - Search form generation # Failed test 'Search form generation' # at t/Heading_MARC21.t line 18. # got: 'Uncles Fiction' # expected: 'Uncles generalsubdiv Fiction' # Looks like you failed 1 test of 3. $ git bz apply 7702 Bug 7702 - Test for C4::Heading::MARC21 should only run under MARC21 Bug 7702: MARC21 heading tests should not run under UNIMARC Apply? [yn] y Applying: Bug 7702: MARC21 heading tests should not run under UNIMARC $ t/Heading_MARC21.t 1..3 ok 1 - use C4::Heading; ok 2 # skip MARC21 heading tests not applicable to UNIMARC ok 3 # skip MARC21 heading tests not applicable to UNIMARC -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7702 Ian Walls <koha.sekjal@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #6 from Ian Walls <koha.sekjal@gmail.com> --- Since our NORMARC expert has signed off on this, I'll take that as a sign that we're good with the test for 'not UNIMARC'. Marking Passed QA. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7702 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |paul.poulain@biblibre.com --- Comment #7 from Paul Poulain <paul.poulain@biblibre.com> --- works fine for UNIMARC as well: 15:53 ~/koha.dev/koha-community (new/bug_7702 $%)$ perl t/Heading_MARC21.t 1..3 ok 1 - use C4::Heading; ok 2 # skip MARC21 heading tests not applicable to UNIMARC ok 3 # skip MARC21 heading tests not applicable to UNIMARC -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7702 --- Comment #8 from Magnus Enger <magnus@enger.priv.no> --- (In reply to comment #2)
To be absolutely explicit, I'd recommend change the conditional from "if not UNIMARC" to "if MARC21 OR NORMARC", so if we later implement another form of MARC, we won't have to remember to adjust this. Ounce of prevention and all that....
I think this uses the same logic as elsewhere in the code where we branch out based on the marcflavour syspref. Here's some code from C4/Koha.pm: if ($marcflavour eq 'UNIMARC') { ... } else { # assume marc21 if not unimarc ... } NORMARC can (luckily) be treated as MARC21 in a lot of contexts. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7702 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org