Comment #2 on issue 144 by mike.lifeguard: t/20_get_allusers.t fails
http://code.google.com/p/perlwikipedia/issues/detail?id=144
I'm sorry, I can't replicate that error. Could you run the following test
for me?
use strict;
use warnings;
use Test::More tests => 1;
use MediaWiki::Bot;
my $bot = MediaWiki::Bot->new();
my @array = $bot->get_allusers(10);
is(scalar(@array), 10, 'Got 10 users') or diag explain \@array;
(Note you'll need Test::More 0.88 to run that)
Sorry for being a little to over zealous and posting before going over
everything. Went through the total deps for this one and got to to build
test out fine.
Please close this issue.
Regards
Nigel Sollars
No matter what dependency issues you had, you shouldn't be able to get 11
results there. I'd appreciate if you would try that test script out. If it
won't produce an error any longer, then we'll close this.
Sorry for the slow response,
test_nigel01:~# ./test.pl
1..1
ok 1 - Got 10 users
test_nigel01:~# ./test.pl
1..1
ok 1 - Got 10 users
test_nigel01:~# ./test.pl
1..1
ok 1 - Got 10 users
test_nigel01:~# ./test.pl
1..1
ok 1 - Got 10 users
test_nigel01:~# ./test.pl
1..1
ok 1 - Got 10 users
test_nigel01:~# ./test.pl
1..1
ok 1 - Got 10 users
I could not get the erroneous result as before.
Nige
Comment #7 on issue 144 by mike.lifeguard: t/20_get_allusers.t fails
http://code.google.com/p/perlwikipedia/issues/detail?id=144
OK, well thanks for trying :)
Hello,
Admittedly, I am relatively new to Perl, as well as cpan testing in
general, but I am actually experiencing similar issues as the OP, under
similar circumstances. Unlike the OP, I am running Mac OS X 10.6 (Snow
Leopard), but like him, I am attempting to install module version 3.2.6
via the cpan commandline tool. Unlike the OP I passed t04, t20 failed with
the following output:
t/20_get_allusers.t ............ 1/1
# Failed test 'Got 10 users'
# at t/20_get_allusers.t line 16.
# got: '11'
# expected: '10'
# Looks like you failed 1 test of 1.
t/20_get_allusers.t ............ Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/1 subtests
and at the end:
t/20_get_allusers.t (Wstat: 256 Tests: 1 Failed: 1)
Failed test: 1
Non-zero exit status: 1
Files=47, Tests=286, 202 wallclock secs ( 0.46 usr 0.33 sys + 20.61 cusr
3.76 csys = 25.16 CPU)
Result: FAIL
Failed 1/47 test programs. 1/286 subtests failed.
make: *** [test_dynamic] Error 255
LIFEGUARD/MediaWiki-Bot-3.2.6.tar.gz
/usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports LIFEGUARD/MediaWiki-Bot-3.2.6.tar.gz
Running make install
make test had returned bad status, won't install without force
I ran your test script above and received the following output:
Natmans-MacBook:Perl natman$ perl ./test.pl
1..1
Can't locate MediaWiki/Bot.pm in @INC (@INC contains:
/Library/Perl/Updates/5.10.0/darwin-thread-multi-2level
/Library/Perl/Updates/5.10.0
/System/Library/Perl/5.10.0/darwin-thread-multi-2level
/System/Library/Perl/5.10.0 /Library/Perl/5.10.0/darwin-thread-multi-2level
/Library/Perl/5.10.0
/Network/Library/Perl/5.10.0/darwin-thread-multi-2level
/Network/Library/Perl/5.10.0 /Network/Library/Perl
/System/Library/Perl/Extras/5.10.0/darwin-thread-multi-2level
/System/Library/Perl/Extras/5.10.0 .) at ./test.pl line 4.
BEGIN failed--compilation aborted at ./test.pl line 4.
# Looks like your test exited with 2 before it could output anything.
Is this the expected output? As a more general question, how could I make
use of the module before I have installed it? The makefile failed to be
created.
Anyhow, any help would be appreciated, as this looks like quite the
valuable tool! I thank you for your time.
Ah, so managed to bumble my way through a force install and ran the test
program again.
Here is the output:
Nat-Hillards-MacBook:Perl natman$ perl ./test.pl
1..1
not ok 1 - Got 10 users
# Failed test 'Got 10 users'
# at ./test.pl line 9.
# got: '11'
# expected: '10'
# [
# ' - )',
# '!',
# '! !',
# '! ! !',
# '! ! ! !',
# '! ! ! ! !',
# '! ! ! ! ! !',
# '! ! ! ! ! ! !',
# '! ! ! ! ! ! ! !',
# '! ! ! ! ! ! ! ! !',
# '! ! ! ! ! ! ! ! !'
# ]
Comment #10 on issue 144 by mike.lifeguard: t/20_get_allusers.t fails
http://code.google.com/p/perlwikipedia/issues/detail?id=144
Thank you for your help. In the future, you can easily run tests by
doing "perl -Ilib t/test.t" -- or even better, use "prove -l t/test.t".
I see that there are indeed 11 entries in that arrayref. I can't see how
that's a bug in MediaWiki::Bot - I suspect it is in MediaWiki::API, but it
will require some in-depth debugging to determine that. I won't be able to
do that until late next week at the earliest.
I thank you for the tip about test running, as well as for looking into
things. Hopefully the issue does not cause too many headaches.
Comment #12 on issue 144 by mike.lifeguard: t/20_get_allusers.t fails
http://code.google.com/p/perlwikipedia/issues/detail?id=144
OK, I was able to reproduce this. The MediaWiki API is returning an extra
result, so I am marking this as invalid. For now, I have made this test a
TODO. Please refer to https://bugzilla.wikimedia.org/show_bug.cgi?id=27649
- when the bug is fixed in MediaWiki, I'll remove the TODO since we can
expect the test to pass.