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

Check unregistered needles when failing assert_screen #715

Merged
merged 1 commit into from Apr 24, 2017

Conversation

coolo
Copy link
Contributor

@coolo coolo commented Feb 7, 2017

needle.pm Outdated
my $hash;
for my $key (qw(tags properties area file png unregistered name)) {
$hash->{$key} = $self->{$key};
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kraih would probably recommend

my $hash = map { $_ => $self->{$_} } qw(tags properties area file png unregistered name));

or something along these lines

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, i would. 😃 (my %hash = map {...} qw(...))

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually it burned in my fingers :)

return $goods || [];
}
my @results;

# now check that it contains all the other tags too
NEEDLE: for my $n (@$goods) {
for my $t (@tags) {
for my $t (@wanted) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you for replacing the ambiguous @tags within the method tags. I got confused by it already :-)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, now there's only the tags() method and the %tags hash ;)

my ($foundneedle, $candidates) = $img->search(\@unregistered_needles, 0, 1, undef);
# the best here is still a failure, as unregistered
push(@$failed_candidates, $foundneedle) if $foundneedle;
push(@$failed_candidates, @$candidates);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well, that's basically what I wanted to say today in the call. Just add some diag and we already have something useful :-)

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling a812a3e on coolo:more_candidates into ** on os-autoinst:master**.

Copy link
Member

@sysrich sysrich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved, but i'd like to know the real poo# this PR addresses

@coolo
Copy link
Contributor Author

coolo commented Mar 27, 2017

It's poo#820 - there is just a s missing in the expanded url

@coolo
Copy link
Contributor Author

coolo commented Apr 24, 2017

this seems to miss a commit or two. At least unregistered is unused

@coolo
Copy link
Contributor Author

coolo commented Apr 24, 2017

but what is there is harmless so merging this

@coolo coolo merged commit da066e7 into os-autoinst:master Apr 24, 2017
@coolo coolo deleted the more_candidates branch April 24, 2017 08:17
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

Successfully merging this pull request may close these issues.

None yet

6 participants