From 125e7d4c8f093ef617ea157552c620d5a66735c9 Mon Sep 17 00:00:00 2001 From: Thomas Applencourt Date: Mon, 30 Mar 2015 10:37:11 +0200 Subject: [PATCH] Add doc and global varialbe in unit_test --- tests/unit_test/unit_test.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/unit_test/unit_test.py b/tests/unit_test/unit_test.py index d08a8baa..f4934c63 100755 --- a/tests/unit_test/unit_test.py +++ b/tests/unit_test/unit_test.py @@ -25,6 +25,12 @@ precision = 1.e-8 # More ezfio condition you set, beter it is +# You cannot order the test flow. +# So if you dont whant to remarque on test (for example the HF), set +# a global variable and check for it +global has_hf_alredy +has_hf_alredy = False + def init_folder(geo, basis, mult=1): ''' Take a geo in arg (aka a existing geo.xyz in test/) @@ -50,8 +56,9 @@ def run_hf(geo, basis): """ Run a simle by default hf EZFIO path = geo.ezfio - """ + global has_hf_alredy + has_hf_alredy = True ref_energy = defaultdict(dict) @@ -111,8 +118,9 @@ def run_full_ci_10k_pt2_end(geo, basis): def run_big_test(geo, basis): + if not has_hf_alredy: + run_hf(geo, basis) - run_hf(geo, basis) run_full_ci_10k_pt2_end(geo, basis) return True