From 372c75ef833adb32072034cbe4fe5ac5edae15c0 Mon Sep 17 00:00:00 2001 From: Tobias Schmidt <tobias.schmidt@unibas.ch> Date: Wed, 3 Nov 2010 16:27:24 +0100 Subject: [PATCH] Revert "added version check for msms unit test, fixes BZDNG-176" This reverts commit bb59a0df2a8bbcbd4ecb3daad73571b7b40d27cc. --- modules/bindings/pymod/msms.py | 17 +---------------- modules/bindings/tests/test_msms.py | 4 ---- 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/modules/bindings/pymod/msms.py b/modules/bindings/pymod/msms.py index fef9f1552..dc3b85906 100644 --- a/modules/bindings/pymod/msms.py +++ b/modules/bindings/pymod/msms.py @@ -38,21 +38,6 @@ class MsmsProcessError(Exception): return repr(self.returncode) -def GetVersion(msms_exe=None, msms_env=None): - msms_executable = _GetExecutable(msms_exe, msms_env) - command = "%s" % (msms_executable) - proc = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE) - stdout_value, stderr_value = proc.communicate() - - version = "" - for l in stdout_value.splitlines(): - if l[0:4]=='MSMS': - version = l.split(' ')[1] - return version - if version=="": - LogWarning('Could not parse MSMS version string') - return - ## \brief Method to check if MSMS executable is present # # \param msms_exe Explicit path to msms executable @@ -135,7 +120,7 @@ def _RunMSMS(command): #check for successful completion of msms if proc.returncode!=0: print "WARNING: msms error\n", stdout_value - raise MsmsProcessError(proc.returncode, command) + raise subprocess.MsmsProcessError(proc.returncode, command) return stdout_value diff --git a/modules/bindings/tests/test_msms.py b/modules/bindings/tests/test_msms.py index 054a63cff..5720372c0 100755 --- a/modules/bindings/tests/test_msms.py +++ b/modules/bindings/tests/test_msms.py @@ -33,15 +33,11 @@ class TestMSMSBindings(unittest.TestCase): if __name__ == "__main__": # test if msms package is available on system, otherwise ignore tests - VERSION_REQUIRED = '2.6.1' try: msms._GetExecutable(msms_exe=None, msms_env='MSMSSERVER') except(settings.FileNotFound): print "Could not find msms executable: ignoring unit tests" exit(0) - version = msms.GetVersion(msms_exe=None, msms_env='MSMSSERVER') - if version!=VERSION_REQUIRED: - print "MSMS version (%s) does not match required version %s: ignoring unit tests"%(version, VERSION_REQUIRED) try: unittest.main() except Exception, e: -- GitLab