Re: Issue 144 in perlwikipedia: t/20_get_allusers.t fails

1 view
Skip to first unread message

perlwi...@googlecode.com

unread,
Feb 9, 2011, 10:32:03 AM2/9/11
to perlwiki...@googlegroups.com
Updates:
Summary: t/20_get_allusers.t fails
Status: New
Owner: mike.lifeguard

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;


perlwi...@googlecode.com

unread,
Feb 9, 2011, 10:36:05 AM2/9/11
to perlwiki...@googlegroups.com

Comment #3 on issue 144 by mike.lifeguard: t/20_get_allusers.t fails
http://code.google.com/p/perlwikipedia/issues/detail?id=144

(Note you'll need Test::More 0.88 to run that)

perlwi...@googlecode.com

unread,
Feb 11, 2011, 3:42:12 PM2/11/11
to perlwiki...@googlegroups.com

Comment #4 on issue 144 by nsoll...@gmail.com: t/20_get_allusers.t fails
http://code.google.com/p/perlwikipedia/issues/detail?id=144

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

perlwi...@googlecode.com

unread,
Feb 11, 2011, 4:06:53 PM2/11/11
to perlwiki...@googlegroups.com

Comment #5 on issue 144 by mike.lifeguard: t/20_get_allusers.t fails
http://code.google.com/p/perlwikipedia/issues/detail?id=144

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.

perlwi...@googlecode.com

unread,
Feb 14, 2011, 9:59:08 AM2/14/11
to perlwiki...@googlegroups.com

Comment #6 on issue 144 by nsoll...@gmail.com: t/20_get_allusers.t fails
http://code.google.com/p/perlwikipedia/issues/detail?id=144

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

perlwi...@googlecode.com

unread,
Feb 14, 2011, 11:10:41 AM2/14/11
to perlwiki...@googlegroups.com
Updates:
Status: Invalid

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 :)

perlwi...@googlecode.com

unread,
Feb 20, 2011, 3:27:33 AM2/20/11
to perlwiki...@googlegroups.com

Comment #8 on issue 144 by distingu...@gmail.com: t/20_get_allusers.t fails
http://code.google.com/p/perlwikipedia/issues/detail?id=144

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.


perlwi...@googlecode.com

unread,
Feb 20, 2011, 3:56:39 AM2/20/11
to perlwiki...@googlegroups.com

Comment #9 on issue 144 by distingu...@gmail.com: t/20_get_allusers.t fails
http://code.google.com/p/perlwikipedia/issues/detail?id=144

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'

# [
# ' - )',
# '!',
# '! !',
# '! ! !',
# '! ! ! !',
# '! ! ! ! !',
# '! ! ! ! ! !',
# '! ! ! ! ! ! !',
# '! ! ! ! ! ! ! !',
# '! ! ! ! ! ! ! ! !',
# '! ! ! ! ! ! ! ! !'
# ]

perlwi...@googlecode.com

unread,
Feb 20, 2011, 1:20:02 PM2/20/11
to perlwiki...@googlegroups.com
Updates:
Status: New

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.

perlwi...@googlecode.com

unread,
Feb 22, 2011, 12:53:35 AM2/22/11
to perlwiki...@googlegroups.com

Comment #11 on issue 144 by distingu...@gmail.com: t/20_get_allusers.t fails
http://code.google.com/p/perlwikipedia/issues/detail?id=144

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.

perlwi...@googlecode.com

unread,
Feb 22, 2011, 10:24:59 PM2/22/11
to perlwiki...@googlegroups.com
Updates:
Status: Invalid

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.

Reply all
Reply to author
Forward
0 new messages