original_docstring: Check that the current build version and date are in the README file
docstring: Check that the current build version and date are in the README file
docstring_tokens: Check that the current build version and date are in the README file
code: def testReadMe(self):
        '''Check that the current build version and date are in the README file'''
  
        filename = 'README.txt' if sys.platform == 'win32' else 'README'
        with open(os.path.join(_outdir, filename), 'r') as file:
          contents = file.read()
        version = 'Version: %s' % build_utils.PLATFORM_VERSION
        annotator.Print('Checking that SDK version = %s' % version)
        self.assertTrue(contents.count(version) == 1,
                        'Version mismatch in %s' % filename)
        revision = 'Revision: %s' % str(build_utils.SVNRevision())
        annotator.Print('Checking that SDK revision = %s' % revision)
        self.assertTrue(contents.count(revision) == 1,
                        'Revision mismatch in %s' % filename)
  
        # Check that the README contains either the current date or yesterday's
        # date (which happens when building over midnight)
        self.assertEqual(
            1,
            contents.count(str(datetime.date.today())) +
            contents.count(str(datetime.date.today() -
                               datetime.timedelta(days=1))),
            "Cannot find today's or yesterday's date in README")
code_tokens: def testReadMe ( self ) : filename = 'README.txt' if sys . platform == 'win32' else 'README' with open ( os . path . join ( _outdir , filename ) , 'r' ) as file : contents = file . read ( ) version = 'Version: %s' % build_utils . PLATFORM_VERSION annotator . Print ( 'Checking that SDK version = %s' % version ) self . assertTrue ( contents . count ( version ) == 1 , 'Version mismatch in %s' % filename ) revision = 'Revision: %s' % str ( build_utils . SVNRevision ( ) ) annotator . Print ( 'Checking that SDK revision = %s' % revision ) self . assertTrue ( contents . count ( revision ) == 1 , 'Revision mismatch in %s' % filename ) self . assertEqual ( 1 , contents . count ( str ( datetime . date . today ( ) ) ) + contents . count ( str ( datetime . date . today ( ) - datetime . timedelta ( days = 1 ) ) ) , "Cannot find today's or yesterday's date in README" )
short_docstring: Check that the current build version and date are in the README file
short_docstring_tokens: Check that the current build version and date are in the README file
comment: '''Check that the current build version and date are in the README file'''$SEP$# Check that the README contains either the current date or yesterday's$SEP$# date (which happens when building over midnight)