Condition Coverage

blib/lib/Python/File.pm
Criterion Covered Total %
condition 37 183 20.2


and 3 conditions

line !l l&&!r l&&r condition
107 0 0 0 exists $self->{'python_preparsed'} && defined $self->{'python_preparsed'}
155 0 0 0 defined $self->{'python_preparsed'}[0] and $self->{'python_preparsed'}[0]->isa("Python::Shebang")
178 0 0 0 exists $self->{'python_preparsed'} && defined $self->{'python_preparsed'}
188 0 0 0 exists $self->{'python_file_path'} && defined $self->{'python_file_path'}
273 0 0 0 exists $self->{'python_preparsed'} && defined $self->{'python_preparsed'}
320 0 0 1 exists $self->{'python_preparsed'} && defined $self->{'python_preparsed'}
361 0 0 105 defined $1 and $1 ne ""
417 119 1 0 $python_line_number == 1 and $Python::File::ARG =~ /^#!.*python.*$/
432 1 119 0 scalar @{$python_preparsed_target;} > 0 and $python_preparsed_target->[-1]->isa("Python::CommentSingleQuotes")
120 0 0 scalar @{$python_preparsed_target;} > 0 and $python_preparsed_target->[-1]->isa("Python::CommentSingleQuotes") and $python_preparsed_target->[-1]{'python_line_number_end'} < 0
1 119 0 scalar @{$python_preparsed_target;} > 0 and $python_preparsed_target->[-1]->isa("Python::CommentDoubleQuotes")
120 0 0 scalar @{$python_preparsed_target;} > 0 and $python_preparsed_target->[-1]->isa("Python::CommentDoubleQuotes") and $python_preparsed_target->[-1]{'python_line_number_end'} < 0
1 15 104 scalar @{$python_preparsed_target;} > 0 and $python_preparsed_target->[-1]->isa("Python::Include")
16 47 57 scalar @{$python_preparsed_target;} > 0 and $python_preparsed_target->[-1]->isa("Python::Include") and $python_preparsed_target->[-1]{'python_line_number_end'} < 0
1 62 0 scalar @{$python_preparsed_target;} > 0 and $python_preparsed_target->[-1]->isa("Python::Function")
63 0 0 scalar @{$python_preparsed_target;} > 0 and $python_preparsed_target->[-1]->isa("Python::Function") and $python_preparsed_target->[-1]{'python_line_number_end_header'} < 0
1 62 0 scalar @{$python_preparsed_target;} > 0 and $python_preparsed_target->[-1]->isa("Python::Class")
63 0 0 scalar @{$python_preparsed_target;} > 0 and $python_preparsed_target->[-1]->isa("Python::Class") and $python_preparsed_target->[-1]{'python_line_number_end_header'} < 0
451 0 0 0 scalar @{$python_preparsed_target;} > 1 and $python_preparsed_target->[-2]->isa("Python::Unknown")
0 0 0 scalar @{$python_preparsed_target;} > 2 and $python_preparsed_target->[-2]->isa("Python::Blank")
0 0 0 scalar @{$python_preparsed_target;} > 2 and $python_preparsed_target->[-2]->isa("Python::Blank") and $python_preparsed_target->[-3]->isa("Python::Unknown")
544 0 0 0 length $python_preparsed_target->[-1]{'indentation'} >= 2 and length $1 >= 2
581 0 0 0 scalar @{$python_preparsed_target;} > 1 and $python_preparsed_target->[-2]->isa("Python::Unknown")
0 0 0 scalar @{$python_preparsed_target;} > 2 and $python_preparsed_target->[-2]->isa("Python::Blank")
0 0 0 scalar @{$python_preparsed_target;} > 2 and $python_preparsed_target->[-2]->isa("Python::Blank") and $python_preparsed_target->[-3]->isa("Python::Unknown")
672 0 0 0 length $python_preparsed_target->[-1]{'indentation'} >= 2 and length $1 >= 2
849 0 0 0 defined $1 and length $1 <= length $python_namespaces->[-1]{'indentation'}
854 0 0 0 scalar @{$python_namespaces;} > 0 and length $1 <= length $python_namespaces->[-1]{'indentation'}
863 0 0 0 scalar @{$python_namespaces->[-1]{'python_preparsed'};} > 0 and $python_namespaces->[-1]{'python_preparsed'}[-1]->isa("Python::Blank")
924 48 0 0 $Python::File::ARG =~ /^(\s*)\'\'\'(.*)\'\'\'\s*$/ and $python_last_active_character ne "("
48 0 0 $Python::File::ARG =~ /^(\s*)\'\'\'(.*)\'\'\'\s*$/ and $python_last_active_character ne "(" and $python_last_active_character ne ","
48 0 0 $Python::File::ARG =~ /^(\s*)\"\"\"(.*)\"\"\"\s*$/ and $python_last_active_character ne "("
48 0 0 $Python::File::ARG =~ /^(\s*)\"\"\"(.*)\"\"\"\s*$/ and $python_last_active_character ne "(" and $python_last_active_character ne ","
929 0 7 0 scalar @{$python_preparsed_target;} > 0 and $python_preparsed_target->[-1]->isa("Python::Blank")
960 0 0 0 scalar @{$python_preparsed_target;} > 0 and $python_preparsed_target->[-1]->isa("Python::Whitespace")
990 1 7 0 scalar @{$python_preparsed_target;} > 0 and $python_preparsed_target->[-1]->isa("Python::Comment")
1033 0 0 0 scalar @{$python_preparsed_target;} > 0 and $python_preparsed_target->[-1]->isa("Python::CommentSingleQuotes")
1071 0 0 0 scalar @{$python_preparsed_target;} > 0 and $python_preparsed_target->[-1]->isa("Python::CommentDoubleQuotes")
1357 0 0 0 $python_preparsed_target->[-1]->isa("Python::Unknown") and $python_preparsed_target->[-1]{'python_source_code'} =~ /^\s*\@.+$/
1614 0 0 0 scalar @{$python_preparsed_target;} > 0 and $python_preparsed_target->[-1]->isa("Python::Unknown")
0 0 0 scalar @{$python_preparsed_target;} > 1 and $python_preparsed_target->[-1]->isa("Python::Blank")
0 0 0 scalar @{$python_preparsed_target;} > 1 and $python_preparsed_target->[-1]->isa("Python::Blank") and $python_preparsed_target->[-2]->isa("Python::Unknown")
1663 0 1 0 scalar @{$python_preparsed_target;} > 0 and $python_preparsed_target->[-1]->isa("Python::Function")
1 0 0 scalar @{$python_preparsed_target;} > 0 and $python_preparsed_target->[-1]->isa("Python::Function") and $python_preparsed_target->[-1]{'python_line_number_end_header'} < 0

or 3 conditions

line l !l&&r !l&&!r condition
188 0 0 0 not exists $self->{'python_file_path'} && defined $self->{'python_file_path'} or $self->{'python_file_path'} eq ""
201 0 0 0 not defined $python_file_name or $python_file_name eq ""
539 0 0 0 $comment eq "" or $python_preparsed_target->[-1]{'is_actually_string_literal'}
667 0 0 0 $comment eq "" or $python_preparsed_target->[-1]{'is_actually_string_literal'}
755 0 0 0 $python_preparsed_target->[-1]{'python_source_code'} =~ /^(\s*)def\s+(\w+)\s*\(\s*((?:[\w\.\*]+\s*(?::\s*[\w\.]+\s*)?(?:\[.*\]\s*)?(?:\=\s*(?:(?:\'.*\')|(?:\".*\")|(?:\(.*\))|(?:\[.*\])|[\w\.\-\(\)]+))?\s*\,\s*(?:\#.*\n)?\s*)*[\w\.\*]+\s*(?::\s*[\w\.]+\s*)?(?:\[.*\]\s*)?(?:\=\s*(?:(?:\'.*\')|(?:\".*\")|(?:\(.*\))|(?:\[.*\])|[\w\.\-\(\)]+))?\s*\,?\s*(?:\#.*\n)?)?\s*\)\s*(?:->\s*([\w\.]+\s*(?:\[.*\]\s*)?))?\s*(:)\s*(\#.*)?$/ or $python_preparsed_target->[-1]{'python_source_code'} =~ /^(\s*)def\s+(\w+)\s*\(\s*((?:(?:(?:const\s+)?(?:[\w\.]+\s*(?:\[[\:\d\,\s]+\])?\s+))?[\w\.\*]+(?:\=\s*(?:(?:\'.*\')|(?:\".*\")|(?:\(.*\))|(?:\[.*\])|[\w\.\-\(\)]+))?\s*\,\s*(?:\#.*\n)?\s*)*(?:(?:const\s+)?(?:[\w\.]+\s*(?:\[[\:\d\,\s]+\])?\s+))?[\w\.\*]+(?:\=\s*(?:(?:\'.*\')|(?:\".*\")|(?:\(.*\))|(?:\[.*\])|[\w\.\-\(\)]+))?\s*\,?\s*(?:\#.*\n)?)?\s*\)\s*(?:->\s*([\w\.]+))?\s*(:)\s*(\#.*)?$/
807 0 0 0 $python_preparsed_target->[-1]{'python_source_code'} =~ /^(\s*)class\s+(\w+)\s*(?:\(\s*((?:[\w\.=]+\s*\,\s*(?:\#.*\n)?\s*)*[\w\.=]+\s*\,?\s*(?:\#.*\n)?)?\s*\)\s*)?(:)\s*(\#.*)?$/ or $python_preparsed_target->[-1]{'python_source_code'} =~ /^(\s*)cdef\s+class\s+(\w+)(?:\{\{\w+\}\})?\s*(?:\(\s*((?:[\w\.=]+(?:\{\{\w+\}\})?[\w\.=]*\s*\,\s*(?:\#.*\n)?\s*)*[\w\.=]+(?:\{\{\w+\}\})?[\w\.=]*\s*\,?\s*(?:\#.*\n)?)?\s*\)\s*)?(:)\s*(\#.*)?$/
924 5 8 35 $Python::File::ARG =~ /^\s*from\s+.*(\()[^\)]*$/ or $Python::File::ARG =~ /^\s*from\s+.*\\$/
13 3 32 $Python::File::ARG =~ /^\s*from\s+.*(\()[^\)]*$/ or $Python::File::ARG =~ /^\s*from\s+.*\\$/ or $Python::File::ARG =~ /^\s*c?import\s+.*\\$/
0 0 0 $Python::File::ARG =~ /^(\s*)def\s+(\w+)\s*\(\s*((?:[\w\.\*]+\s*(?::\s*[\w\.]+\s*)?(?:\[.*\]\s*)?(?:\=\s*(?:(?:\'.*\')|(?:\".*\")|(?:\(.*\))|(?:\[.*\])|[\w\.\-\(\)]+))?\s*\,\s*(?:\#.*\n)?\s*)*[\w\.\*]+\s*(?::\s*[\w\.]+\s*)?(?:\[.*\]\s*)?(?:\=\s*(?:(?:\'.*\')|(?:\".*\")|(?:\(.*\))|(?:\[.*\])|[\w\.\-\(\)]+))?\s*\,?\s*(?:\#.*\n)?)?\s*\)\s*(?:->\s*([\w\.]+\s*(?:\[.*\]\s*)?))?\s*(:)\s*(\#.*)?$/ or $Python::File::ARG =~ /^(\s*)def\s+(\w+)\s*\(\s*((?:(?:(?:const\s+)?(?:[\w\.]+\s*(?:\[[\:\d\,\s]+\])?\s+))?[\w\.\*]+(?:\=\s*(?:(?:\'.*\')|(?:\".*\")|(?:\(.*\))|(?:\[.*\])|[\w\.\-\(\)]+))?\s*\,\s*)*(?:(?:const\s+)?(?:[\w\.]+\s*(?:\[[\:\d\,\s]+\])?\s+))?[\w\.\*]+(?:\=\s*(?:(?:\'.*\')|(?:\".*\")|(?:\(.*\))|(?:\[.*\])|[\w\.\-\(\)]+))?\s*\,?)?\s*\)\s*(?:->\s*([\w\.]+))?\s*(:)\s*(\#.*)?$/
0 0 0 $Python::File::ARG =~ /^(\s*)def\s+(\w+)\s*\(\s*((?:[\w\.\*]+\s*(?::\s*[\w\.]+\s*)?(?:\[.*\]\s*)?(?:\=\s*(?:(?:\'.*\')|(?:\".*\")|(?:\(.*\))|(?:\[.*\])|[\w\.\-\(\)]+))?\s*\,\s*(?:\#.*\n)?\s*)*[\w\.\*]+\s*(?::\s*[\w\.]+\s*)?(?:\[.*\]\s*)?(?:\=\s*(?:(?:\'.*\')|(?:\".*\")|(?:\(.*\))|(?:\[.*\])|[\w\.\-\(\)]+))?\s*\,?\s*(?:\#.*\n)?)?\s*\)\s*(?:->\s*([\w\.]+\s*(?:\[.*\]\s*)?))?\s*(:)\s*(\#.*)?$/ or $Python::File::ARG =~ /^(\s*)def\s+(\w+)\s*\(\s*((?:(?:(?:const\s+)?(?:[\w\.]+\s*(?:\[[\:\d\,\s]+\])?\s+))?[\w\.\*]+(?:\=\s*(?:(?:\'.*\')|(?:\".*\")|(?:\(.*\))|(?:\[.*\])|[\w\.\-\(\)]+))?\s*\,\s*)*(?:(?:const\s+)?(?:[\w\.]+\s*(?:\[[\:\d\,\s]+\])?\s+))?[\w\.\*]+(?:\=\s*(?:(?:\'.*\')|(?:\".*\")|(?:\(.*\))|(?:\[.*\])|[\w\.\-\(\)]+))?\s*\,?)?\s*\)\s*(?:->\s*([\w\.]+))?\s*(:)\s*(\#.*)?$/ or $Python::File::ARG =~ /^(\s*)def\s+(\w+)/
0 0 0 $Python::File::ARG =~ /^(\s*)class\s+(\w+)\s*(?:\(\s*((?:[\w\.=]+\s*\,\s*)*[\w\.=]+\s*\,?)?\s*\)\s*)?(:)\s*(\#.*)?$/ or $Python::File::ARG =~ /^(\s*)class\s+(\w+)\s*\(/
0 0 0 $Python::File::ARG =~ /^(\s*)class\s+(\w+)\s*(?:\(\s*((?:[\w\.=]+\s*\,\s*)*[\w\.=]+\s*\,?)?\s*\)\s*)?(:)\s*(\#.*)?$/ or $Python::File::ARG =~ /^(\s*)class\s+(\w+)\s*\(/ or $Python::File::ARG =~ /^(\s*)cdef\s+class\s+(\w+)\s*(?:\(\s*((?:[\w\.=]+(?:\{\{\w+\}\})?[\w\.=]*\s*\,\s*)*[\w\.=]+(?:\{\{\w+\}\})?[\w\.=]*\s*\,?)?\s*\)\s*)?(:)\s*(\#.*)?$/
0 0 0 $Python::File::ARG =~ /^(\s*)class\s+(\w+)\s*(?:\(\s*((?:[\w\.=]+\s*\,\s*)*[\w\.=]+\s*\,?)?\s*\)\s*)?(:)\s*(\#.*)?$/ or $Python::File::ARG =~ /^(\s*)class\s+(\w+)\s*\(/ or $Python::File::ARG =~ /^(\s*)cdef\s+class\s+(\w+)\s*(?:\(\s*((?:[\w\.=]+(?:\{\{\w+\}\})?[\w\.=]*\s*\,\s*)*[\w\.=]+(?:\{\{\w+\}\})?[\w\.=]*\s*\,?)?\s*\)\s*)?(:)\s*(\#.*)?$/ or $Python::File::ARG =~ /^(\s*)cdef\s+class\s+(\w+)\s*\(/
1100 0 0 0 $python_last_active_character eq "(" or $python_last_active_character eq ","
1131 0 0 0 $python_last_active_character eq "(" or $python_last_active_character eq ","
1344 0 0 0 $python_preparsed_target->[-1]->isa("Python::Blank") or $python_preparsed_target->[-1]->isa("Python::Whitespace")
0 0 0 $python_preparsed_target->[-1]->isa("Python::Blank") or $python_preparsed_target->[-1]->isa("Python::Whitespace") or $python_preparsed_target->[-1]->isa("Python::Comment")