<s> import re <EOL> from . default import DefaultParser <EOL> class RspecParser ( DefaultParser ) : <EOL> name = "<STR_LIT>" <EOL> def command_matches ( self , command ) : <EOL> return "<STR_LIT>" in command <EOL> def num_passed ( self , result ) : <EOL> return self . num_total ( result ) - self . num_failed ( result ) <EOL> def num_total ( self , result ) : <EOL> m = re . findall ( '<STR_LIT>' , result . output ) <EOL> return int ( m [ - <NUM_LIT:1> ] ) <EOL> def num_failed ( self , result ) : <EOL> m = re . findall ( '<STR_LIT>' , result . output ) <EOL> return int ( m [ - <NUM_LIT:1> ] ) <EOL> def num_error ( self , result ) : <EOL> return self . num_failed ( result ) </s>
