<s> import subprocess <EOL> import unittest <EOL> import cricket <EOL> from cricket . unittest import discoverer <EOL> from cricket . unittest import executor <EOL> class TestCollection ( unittest . TestCase ) : <EOL> def test_testCollection ( self ) : <EOL> '''<STR_LIT>''' <EOL> PTD = discoverer . PyTestDiscoverer ( ) <EOL> PTD . collect_tests ( ) <EOL> tests = str ( PTD ) . split ( '<STR_LIT:\n>' ) <EOL> test_found = False <EOL> for test in tests : <EOL> test_found |= '<STR_LIT>' in test <EOL> self . assertTrue ( test_found ) <EOL> class TestExecutorCmdLine ( unittest . TestCase ) : <EOL> def test_labels ( self ) : <EOL> '''<STR_LIT>''' <EOL> labels = [ '<STR_LIT>' ] <EOL> cmdline = [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] + labels <EOL> runner = subprocess . Popen ( <EOL> cmdline , <EOL> stdin = None , <EOL> stdout = subprocess . PIPE , <EOL> stderr = subprocess . PIPE , <EOL> shell = False , <EOL> ) <EOL> output = '<STR_LIT>' <EOL> for line in runner . stdout : <EOL> output += line . decode ( '<STR_LIT:utf-8>' ) <EOL> self . assertIn ( '<STR_LIT>' , <EOL> output ) <EOL> self . assertNotIn ( '<STR_LIT>' , <EOL> output ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> unittest . main ( ) </s>
