Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test failure: symbol collision on done_testing #7

Open
emollier opened this issue Jan 21, 2025 · 1 comment
Open

test failure: symbol collision on done_testing #7

emollier opened this issue Jan 21, 2025 · 1 comment
Labels

Comments

@emollier
Copy link

Greetings,

In Debian sid, we recently identified a test failure, recorded in Debian bug #1093341, which boils down to:

Overwriting existing sub 'main::done_testing' with sub 'done_testing' exported by Test::Modern at t/03_kk_attean.t line 7.
#   Failed test 'no (unexpected) warnings (via done_testing)'
#   at t/03_kk_attean.t line 76.
# Looks like you failed 1 test of 8.
t/03_kk_attean.t .........

[...]

not ok 8 - no (unexpected) warnings (via done_testing)
1..8
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/8 subtests

From the quick tests I did, this can be addressed by demoting the inclusion of Test::Modern to a require statement. I'm not too sure which implementation of done_testing was intended originally, but I can confirm the below patch resolves the problem if that helps:

--- librdf-rdfa-generator-perl.orig/t/03_kk_attean.t
+++ librdf-rdfa-generator-perl/t/03_kk_attean.t
@@ -4,7 +4,7 @@
 
 use strict;
 use Test::More;
-use Test::Modern;
+require Test::Modern;
 
 BEGIN {
   use_ok('Attean') or BAIL_OUT "Attean required for tests";
@@ -73,4 +73,4 @@
   like($string, qr|datatype="xsd:decimal"|, 'pi decimal datatype present');
   return $string;
 }
-done_testing();
+Test::Modern::done_testing();

Have a nice day, :)
Étienne.

@kjetilk
Copy link
Member

kjetilk commented Feb 5, 2025

Thanks a lot! I see that you have fixed it for Debian, which is great!

I'll try to have a look at it next week.

@kjetilk kjetilk added the bug label Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants