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

t/basic.t fails on some systems #10

Open
eserte opened this issue Dec 29, 2023 · 1 comment
Open

t/basic.t fails on some systems #10

eserte opened this issue Dec 29, 2023 · 1 comment

Comments

@eserte
Copy link

eserte commented Dec 29, 2023

The test suite fails on some of my smokers like this:

#   Failed test '406 Not Acceptable'
#   at t/basic.t line 174.
#          got: '200'
#     expected: '406'

#   Failed test '406 Not Acceptable'
#   at t/basic.t line 192.
#          got: '200'
#     expected: '406'
# Looks like you failed 2 tests of 66.
t/basic.t .. 
Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/66 subtests 
	(less 10 skipped subtests: 54 okay)

It happens also for other users, see http://www.cpantesters.org/cpan/report/a29bedee-a03b-11ee-b46c-98f136964987 for an example.

Why is this so? It seems that using Test::Without::Module->import(...) does not have any effect:

$ perl5.30.3 -e 'Test::Without::Module->import("Text::Tabs"); require Text::Tabs;'
-> no error

What seems to work is a use wrapped in an eval (so it works at runtime):

$  perl5.30.3 -e 'eval q{ use Test::Without::Module ("Text::Tabs") }; require Text::Tabs;'
Can't locate Text/Tabs.pm in @INC (you may need to install the Text::Tabs module) (@INC contains: CODE(0x25680d0) /opt/perl-5.30.3/lib/site_perl/5.30.3/x86_64-linux /opt/perl-5.30.3/lib/site_perl/5.30.3 /opt/perl-5.30.3/lib/5.30.3/x86_64-linux /opt/perl-5.30.3/lib/5.30.3) at -e line 1.

This is not exactly documented in the Test::Without::Module manpage, but the opposite using no is.

@eserte
Copy link
Author

eserte commented Dec 29, 2023

However there's an unclear thing: the import/unimport approach worked somehow until 5.37.6, it seems: http://matrix.cpantesters.org/?dist=Mojolicious-Plugin-ReplyTable%200.12
So maybe additionally something in perl's internals changed...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant