559e68fcac66c449772be2b21af92f502df70e5f,framework/Driver.py,,checkVersions,#,102

Before Change


  sys.path.append(os.path.join(os.path.dirname(frameworkDir),"scripts","TestHarness","testers"))
  import RavenUtils
  sys.path.pop() //remove testers path
  missing,outOfRange,notQA = RavenUtils.check_for_missing_modules(False)
  if len(missing) + len(outOfRange) > 0 and RavenUtils.check_versions():
    print("ERROR: too old, too new, or missing raven libraries, not running:")
    for error in missing + outOfRange + notQA:
      print(error)

After Change


    @ Out, None
  
  // if libraries are not to be checked, we"re done here
  if not LH.checkVersions():
    return
  // otherwise, we check for incorrect libraries
  missing, notQA = LH.checkLibraries()
  if missing:
    print("ERROR: Some required Python libraries are missing but required to run RAVEN as configured:")
    for lib, version in missing:
      // report the missing library
      msg = "  -> MISSING: {}".format(lib)
      // add the required version if applicable
      if version is not None:
        msg += " version {}".format(version)
      print(msg)
  if notQA:
    print("ERROR: Some required Python libraries have incorrect versions for running RAVEN as configured:")
    for lib, found, need in notQA:
      print("  -> WRONG VERSION: lib "{}" need "{}" but found "{}"".format(lib, found, need))
  if missing or notQA:
    print("Try installing libraries using instructions on RAVEN repository wiki at " +
           "https://github.com/idaholab/raven/wiki/Installing_RAVEN_Libraries.")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: idaholab/raven
Commit Name: 559e68fcac66c449772be2b21af92f502df70e5f
Time: 2019-11-07
Author: paul.talbot@inl.gov
File Name: framework/Driver.py
Class Name:
Method Name: checkVersions


Project Name: idaholab/raven
Commit Name: 559e68fcac66c449772be2b21af92f502df70e5f
Time: 2019-11-07
Author: paul.talbot@inl.gov
File Name: scripts/TestHarness/testers/RavenPython.py
Class Name: RavenPython
Method Name: check_runnable


Project Name: idaholab/raven
Commit Name: 559e68fcac66c449772be2b21af92f502df70e5f
Time: 2019-11-07
Author: paul.talbot@inl.gov
File Name: scripts/TestHarness/testers/RavenErrors.py
Class Name: RavenErrors
Method Name: check_runnable