Skip Menu |

This queue is for tickets about the IMDB-Film CPAN distribution.

Report information
The Basics
Id: 61805
Status: open
Priority: 0/
Queue: IMDB-Film

People
Owner: Nobody in particular
Requestors: anton.giguz [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.46
Fixed in: (no value)



Subject: Tests 'Movie Language', 'Movie Country', and 'Movies IMDB Code' failed
IMDB-Film-0.46 This is perl, v5.10.1 (*) built for i486-linux-gnu-thread-multi Linux luffy 2.6.32-24-generic #43-Ubuntu SMP Thu Sep 16 14:17:33 UTC 2010 i686 GNU/Linux While running 'install IMDB::Film' from the CPAN shell: Running make test PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/01_base.t t/m1_get_movie_by_code.t t/m2_get_movie_by_title.t t/m3_get_movie_by_wrong_title.t t/m4_get_movie_by_title_single_match.t t/m5_get_movie_by_title_without_rate.t t/m6_get_movie_by_title_with_cr_casts.t t/m7_get_movie_by_info_offline.t t/01_base.t .............................. ok t/m1_get_movie_by_code.t ................. 1/22 # Failed test 'Movie Language' # at t/m1_get_movie_by_code.t line 57. # got: undef # expected: 'English' # Failed test 'Movie Country' # at t/m1_get_movie_by_code.t line 58. # got: undef # expected: 'USA' t/m1_get_movie_by_code.t ................. 12/22 # Looks like you failed 2 tests of 22. t/m1_get_movie_by_code.t ................. Dubious, test returned 2 (wstat 512, 0x200) Failed 2/22 subtests t/m2_get_movie_by_title.t ................ 1/18 # Failed test 'Movie Language' # at t/m2_get_movie_by_title.t line 59. # got: undef # expected: 'English' # Failed test 'Movie Country' # at t/m2_get_movie_by_title.t line 60. # got: undef # expected: 'USA' t/m2_get_movie_by_title.t ................ 12/18 # Looks like you failed 2 tests of 18. t/m2_get_movie_by_title.t ................ Dubious, test returned 2 (wstat 512, 0x200) Failed 2/18 subtests t/m3_get_movie_by_wrong_title.t .......... ok t/m4_get_movie_by_title_single_match.t ... ok t/m5_get_movie_by_title_without_rate.t ... 1/2 # Failed test 'Movies IMDB Code' # at t/m5_get_movie_by_title_without_rate.t line 11. # got: '0061175' # expected: '0412158' # Looks like you failed 1 test of 2. t/m5_get_movie_by_title_without_rate.t ... Dubious, test returned 1 (wstat 256, 0x100) Failed 1/2 subtests t/m6_get_movie_by_title_with_cr_casts.t .. ok t/m7_get_movie_by_info_offline.t ......... ok Test Summary Report ------------------- t/m1_get_movie_by_code.t (Wstat: 512 Tests: 22 Failed: 2) Failed tests: 9-10 Non-zero exit status: 2 t/m2_get_movie_by_title.t (Wstat: 512 Tests: 18 Failed: 2) Failed tests: 9-10 Non-zero exit status: 2 t/m5_get_movie_by_title_without_rate.t (Wstat: 256 Tests: 2 Failed: 1) Failed test: 1 Non-zero exit status: 1 Files=8, Tests=54, 21 wallclock secs ( 0.05 usr 0.01 sys + 2.70 cusr 0.16 csys = 2.92 CPU) Result: FAIL Failed 3/8 test programs. 5/54 subtests failed. make: *** [test_dynamic] Error 255 STEPANOV/IMDB-Film-0.46.tar.gz /usr/bin/make test -- NOT OK A patch that presumably fixes 'language' and 'country' issues is attached.
Subject: Film.pm.patch
--- Film.pm 2010-09-08 21:34:15.000000000 +0700 +++ Film.pm.new 2010-10-01 05:46:38.000000000 +0700 @@ -1057,7 +1057,7 @@ my (@countries); while(my $tag = $parser->get_tag()) { - if( $tag->[0] eq 'a' && $tag->[1]{href} && $tag->[1]{href} =~ /countries/i ) { + if( $tag->[0] eq 'a' && $tag->[1]{href} && $tag->[1]{href} =~ /country/i ) { my $text = $parser->get_text(); $text =~ s/\n//g; push @countries, $text; @@ -1093,7 +1093,7 @@ while($tag = $parser->get_tag()) { - if( $tag->[0] eq 'a' && $tag->[1]{href} && $tag->[1]{href} =~ /languages/i ) { + if( $tag->[0] eq 'a' && $tag->[1]{href} && $tag->[1]{href} =~ /language/i ) { my $text = $parser->get_text(); $text =~ s/\n//g; push @languages, $text;
Subject: Re: [rt.cpan.org #61805] Tests 'Movie Language', 'Movie Country', and 'Movies IMDB Code' failed
Date: Sat, 9 Oct 2010 16:43:34 +0300
To: bug-IMDB-Film [...] rt.cpan.org
From: Michael Stepanov <stepanov.michael [...] gmail.com>
Hi, Thanks for our bugreport. Will investigate and fix it. On Fri, Oct 1, 2010 at 3:16 AM, Anton Giguz via RT < bug-IMDB-Film@rt.cpan.org> wrote: Show quoted text
> Thu Sep 30 20:16:28 2010: Request 61805 was acted upon. > Transaction: Ticket created by giguz > Queue: IMDB-Film > Subject: Tests 'Movie Language', 'Movie Country', and 'Movies IMDB > Code' > failed > Broken in: 0.46 > Severity: Normal > Owner: Nobody > Requestors: anton.giguz@gmail.com > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=61805 > > > > IMDB-Film-0.46 > This is perl, v5.10.1 (*) built for i486-linux-gnu-thread-multi > Linux luffy 2.6.32-24-generic #43-Ubuntu SMP Thu Sep 16 14:17:33 UTC > 2010 i686 GNU/Linux > > While running 'install IMDB::Film' from the CPAN shell: > > > Running make test > PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" > "test_harness(0, 'blib/lib', 'blib/arch')" t/01_base.t > t/m1_get_movie_by_code.t t/m2_get_movie_by_title.t > t/m3_get_movie_by_wrong_title.t t/m4_get_movie_by_title_single_match.t > t/m5_get_movie_by_title_without_rate.t > t/m6_get_movie_by_title_with_cr_casts.t t/m7_get_movie_by_info_offline.t > t/01_base.t .............................. ok > t/m1_get_movie_by_code.t ................. 1/22 > # Failed test 'Movie Language' > # at t/m1_get_movie_by_code.t line 57. > # got: undef > # expected: 'English' > > # Failed test 'Movie Country' > # at t/m1_get_movie_by_code.t line 58. > # got: undef > # expected: 'USA' > t/m1_get_movie_by_code.t ................. 12/22 # Looks like you failed > 2 tests of 22. > t/m1_get_movie_by_code.t ................. Dubious, test returned 2 > (wstat 512, 0x200) > Failed 2/22 subtests > t/m2_get_movie_by_title.t ................ 1/18 > # Failed test 'Movie Language' > # at t/m2_get_movie_by_title.t line 59. > # got: undef > # expected: 'English' > > # Failed test 'Movie Country' > # at t/m2_get_movie_by_title.t line 60. > # got: undef > # expected: 'USA' > t/m2_get_movie_by_title.t ................ 12/18 # Looks like you failed > 2 tests of 18. > t/m2_get_movie_by_title.t ................ Dubious, test returned 2 > (wstat 512, 0x200) > Failed 2/18 subtests > t/m3_get_movie_by_wrong_title.t .......... ok > t/m4_get_movie_by_title_single_match.t ... ok > t/m5_get_movie_by_title_without_rate.t ... 1/2 > # Failed test 'Movies IMDB Code' > # at t/m5_get_movie_by_title_without_rate.t line 11. > # got: '0061175' > # expected: '0412158' > # Looks like you failed 1 test of 2. > t/m5_get_movie_by_title_without_rate.t ... Dubious, test returned 1 > (wstat 256, 0x100) > Failed 1/2 subtests > t/m6_get_movie_by_title_with_cr_casts.t .. ok > t/m7_get_movie_by_info_offline.t ......... ok > > Test Summary Report > ------------------- > t/m1_get_movie_by_code.t (Wstat: 512 Tests: 22 Failed: 2) > Failed tests: 9-10 > Non-zero exit status: 2 > t/m2_get_movie_by_title.t (Wstat: 512 Tests: 18 Failed: 2) > Failed tests: 9-10 > Non-zero exit status: 2 > t/m5_get_movie_by_title_without_rate.t (Wstat: 256 Tests: 2 Failed: 1) > Failed test: 1 > Non-zero exit status: 1 > Files=8, Tests=54, 21 wallclock secs ( 0.05 usr 0.01 sys + 2.70 cusr > 0.16 csys = 2.92 CPU) > Result: FAIL > Failed 3/8 test programs. 5/54 subtests failed. > make: *** [test_dynamic] Error 255 > STEPANOV/IMDB-Film-0.46.tar.gz > /usr/bin/make test -- NOT OK > > > A patch that presumably fixes 'language' and 'country' issues is attached. >
-- Best regards, Michael Stepanov http://linuxmce.ru
Subject: Re: [rt.cpan.org #61805] Tests 'Movie Language', 'Movie Country', and 'Movies IMDB Code' failed
Date: Wed, 13 Oct 2010 11:48:26 +0300
To: bug-IMDB-Film [...] rt.cpan.org
From: Michael Stepanov <stepanov.michael [...] gmail.com>
Hi, The new version of IMDB::Film 0.47 is uploaded to CPAN. It'll be available after 2-3 hours, I guess. Please, try it and send me all found bugs. On Fri, Oct 1, 2010 at 3:16 AM, Anton Giguz via RT < bug-IMDB-Film@rt.cpan.org> wrote: Show quoted text
> Thu Sep 30 20:16:28 2010: Request 61805 was acted upon. > Transaction: Ticket created by giguz > Queue: IMDB-Film > Subject: Tests 'Movie Language', 'Movie Country', and 'Movies IMDB > Code' > failed > Broken in: 0.46 > Severity: Normal > Owner: Nobody > Requestors: anton.giguz@gmail.com > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=61805 > > > > IMDB-Film-0.46 > This is perl, v5.10.1 (*) built for i486-linux-gnu-thread-multi > Linux luffy 2.6.32-24-generic #43-Ubuntu SMP Thu Sep 16 14:17:33 UTC > 2010 i686 GNU/Linux > > While running 'install IMDB::Film' from the CPAN shell: > > > Running make test > PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" > "test_harness(0, 'blib/lib', 'blib/arch')" t/01_base.t > t/m1_get_movie_by_code.t t/m2_get_movie_by_title.t > t/m3_get_movie_by_wrong_title.t t/m4_get_movie_by_title_single_match.t > t/m5_get_movie_by_title_without_rate.t > t/m6_get_movie_by_title_with_cr_casts.t t/m7_get_movie_by_info_offline.t > t/01_base.t .............................. ok > t/m1_get_movie_by_code.t ................. 1/22 > # Failed test 'Movie Language' > # at t/m1_get_movie_by_code.t line 57. > # got: undef > # expected: 'English' > > # Failed test 'Movie Country' > # at t/m1_get_movie_by_code.t line 58. > # got: undef > # expected: 'USA' > t/m1_get_movie_by_code.t ................. 12/22 # Looks like you failed > 2 tests of 22. > t/m1_get_movie_by_code.t ................. Dubious, test returned 2 > (wstat 512, 0x200) > Failed 2/22 subtests > t/m2_get_movie_by_title.t ................ 1/18 > # Failed test 'Movie Language' > # at t/m2_get_movie_by_title.t line 59. > # got: undef > # expected: 'English' > > # Failed test 'Movie Country' > # at t/m2_get_movie_by_title.t line 60. > # got: undef > # expected: 'USA' > t/m2_get_movie_by_title.t ................ 12/18 # Looks like you failed > 2 tests of 18. > t/m2_get_movie_by_title.t ................ Dubious, test returned 2 > (wstat 512, 0x200) > Failed 2/18 subtests > t/m3_get_movie_by_wrong_title.t .......... ok > t/m4_get_movie_by_title_single_match.t ... ok > t/m5_get_movie_by_title_without_rate.t ... 1/2 > # Failed test 'Movies IMDB Code' > # at t/m5_get_movie_by_title_without_rate.t line 11. > # got: '0061175' > # expected: '0412158' > # Looks like you failed 1 test of 2. > t/m5_get_movie_by_title_without_rate.t ... Dubious, test returned 1 > (wstat 256, 0x100) > Failed 1/2 subtests > t/m6_get_movie_by_title_with_cr_casts.t .. ok > t/m7_get_movie_by_info_offline.t ......... ok > > Test Summary Report > ------------------- > t/m1_get_movie_by_code.t (Wstat: 512 Tests: 22 Failed: 2) > Failed tests: 9-10 > Non-zero exit status: 2 > t/m2_get_movie_by_title.t (Wstat: 512 Tests: 18 Failed: 2) > Failed tests: 9-10 > Non-zero exit status: 2 > t/m5_get_movie_by_title_without_rate.t (Wstat: 256 Tests: 2 Failed: 1) > Failed test: 1 > Non-zero exit status: 1 > Files=8, Tests=54, 21 wallclock secs ( 0.05 usr 0.01 sys + 2.70 cusr > 0.16 csys = 2.92 CPU) > Result: FAIL > Failed 3/8 test programs. 5/54 subtests failed. > make: *** [test_dynamic] Error 255 > STEPANOV/IMDB-Film-0.46.tar.gz > /usr/bin/make test -- NOT OK > > > A patch that presumably fixes 'language' and 'country' issues is attached. >
-- Best regards, Michael Stepanov http://linuxmce.ru
On Wed Oct 13 04:48:55 2010, stepanov.michael@gmail.com wrote: Show quoted text
> The new version of IMDB::Film 0.47 is uploaded to CPAN. It'll be available > after 2-3 hours, I guess. Please, try it and send me all found bugs.
TV series support? I was impatient enough to make a patch. So far, it doesn't break any test. Yet, it is passing a new one I have added. :) Drawbacks: IMDB's naming of 'kinds' become the default. I.e., 'video movie' is 'video' now; 'tv mini series' -> 'tv mini-series'. I see no point of making it backward compatible so left as-is. %FILM_KIND is left alone. diff -Nubr orig/IMDB-Film-0.47/lib/IMDB/Film.pm IMDB-Film-0.47/lib/IMDB/Film.pm --- orig/IMDB-Film-0.47/lib/IMDB/Film.pm 2010-10-13 11:39:16.000000000 +0300 +++ IMDB-Film-0.47/lib/IMDB/Film.pm 2010-10-13 14:52:11.000000000 +0300 @@ -371,12 +371,9 @@ $self->_show_message("title: $title", 'DEBUG'); - # TODO: implement parsing of TV series like ALF (TV Series 1986–1990) - ($self->{_title}, $self->{_year}, $self->{_kind}) = $title =~ m!(.*?)\s+\((\d{4})\)(?:\s\((\w*)\))?!; - unless($self->{_title}) { - ($self->{_title}, $self->{_kind}, $self->{_year}) = $title =~ m!(.*?)\s+\((.*?)?\s?([0-9\-]*)\)!; - } - $self->{_kind} = '' unless $self->{_kind}; + ($self->{_title}, $self->{_kind}, $self->{_year}) = $title =~ m!^(.*?)\s+\((?:(.*?)\s)?(\d{4})\D!; + $self->{_kind} = 'movie' unless $self->{_kind}; + $self->{_kind} = lc($self->{_kind}); # "The Series" An Episode (2005) # "The Series" (2005) @@ -401,7 +398,7 @@ sub kind { my CLASS_NAME $self = shift; - return $FILM_KIND{$self->{_kind}}; + return $self->{_kind}; } =item year() diff -Nubr orig/IMDB-Film-0.47/t/m8_tv_series.t IMDB-Film-0.47/t/m8_tv_series.t --- orig/IMDB-Film-0.47/t/m8_tv_series.t 1970-01-01 03:00:00.000000000 +0300 +++ IMDB-Film-0.47/t/m8_tv_series.t 2010-10-13 14:45:30.000000000 +0300 @@ -0,0 +1,27 @@ +use strict; +use warnings; + +use Test::More tests => 9; + +use IMDB::Film; +use Data::Dumper; + +my $crit = '0088571'; +my %films = ( + date => '3 March 1985', + plot => 'This is the pilot episode of the "Moonlighting" (1985) television series. Madeline \'Maddie\' Hayes, a wealthy former model, discovers one morning that her business manager has stolen all the money she has in the bank. However, it turns out that she still owns some non-liquid assets -- money-losing companies which were maintained as tax write-offs -- one of which is a detective agency run by David Addison. Maddie meets with him to inform him that the company is to be shut down, but he tries to persuade her to keep it open by convincing her that the detective agency can make money. To prove it, David brings Maddie into a murder case involving a mysterious wristwatch and four million dollars worth of smuggled diamonds.', + title => 'Moonlighting (Pilot)', + id => '0089619', + episode => 1, + season => 1 +); + +my %pars = (cache => 0, debug => 0, crit => $crit); + +my $obj = new IMDB::Film(%pars); +isa_ok($obj, 'IMDB::Film'); + +is($obj->kind, 'tv series', 'Entry kind'); +is(scalar(@{$obj->episodes}), 66, 'TV series episodes'); +my $episode = $obj->episodes->[0]; +is($episode->{$_}, $films{$_}, "Episode $_") foreach keys %films;