def verify_json_dump(self, selected_jobs, global_args, umask, run_id): self.assertTrue(os.path.isfile(self.JOBS_JSON_FILE)) config = load_configs(self.JOBS_JSON_FILE) self.assertEqual(run_id, config["run_id"]) self.assertEqual(umask, int(config["umask"], 8)) self.assertEqual(len(selected_jobs), len(config["jobList"])) ert_version = config["ert_version"] loaded_version = Version(ert_version[0], ert_version[1], ert_version[2]) self.assertEqual(Version.currentVersion(), loaded_version) for i in range(len(selected_jobs)): job = joblist[selected_jobs[i]] loaded_job = config["jobList"][i] # Since no argList is loaded as an empty list by ext_job arg_list_back_up = job["argList"] job["argList"] = empty_list_if_none(job["argList"]) # Since name is set to default if none provided by ext_job name_back_up = job["name"] job["name"] = default_name_if_none(job["name"]) for key in json_keywords: self.assertEqual(job[key], loaded_job[key]) job["argList"] = arg_list_back_up job["name"] = name_back_up
def requireVersion(major, minor, micro="git"): required_version = Version(major, minor, micro) current_version = Version.currentVersion() if required_version < current_version: return True else: return False
def test_current(self): current = Version.currentVersion() self.assertTrue(current > (0, 0, 0)) pfx = 'Version(major=' self.assertEqual(pfx, repr(current)[:len(pfx)])
def test_root_version(self): cv = Version.currentVersion() self.assertEqual(ecl.__version__, cv.versionString())