Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
kvashchuka committed Oct 13, 2023
1 parent a12530e commit ad3ecb8
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions tests/unit_tests/analysis/test_adaptive_localization.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

def run_cli_ES_with_case(poly_config):
config_name = poly_config.split(".")[0]
prior_sample_name = "prior_sample"+"_"+config_name
posterior_sample_name = "posterior_sample"+"_"+config_name
prior_sample_name = "prior_sample" + "_" + config_name
posterior_sample_name = "posterior_sample" + "_" + config_name
parser = ArgumentParser(prog="test_main")
parsed = ert_parser(
parser,
Expand All @@ -33,7 +33,6 @@ def run_cli_ES_with_case(poly_config):
)
run_cli(parsed)
storage_path = ErtConfig.from_file(poly_config).ens_path
#facade = LibresFacade.from_config_file(ert_config)
with open_storage(storage_path) as storage:
prior_ensemble = storage.get_ensemble_by_name(prior_sample_name)
prior_sample = prior_ensemble.load_parameters("COEFFS")
Expand All @@ -56,7 +55,7 @@ def test_that_adaptive_localization_with_cutoff_1_equals_ensemble_prior(copy_cas
with open("poly.ert", "r+") as f:
lines = f.readlines()
lines.insert(2, random_seed_line)
lines.insert(10, set_adaptive_localization_1)
lines.insert(9, set_adaptive_localization_1)

with open("poly_loc_1.ert", "w") as f:
f.writelines(lines)
Expand All @@ -69,7 +68,7 @@ def test_that_adaptive_localization_with_cutoff_1_equals_ensemble_prior(copy_cas
@pytest.mark.integration_test
def test_that_adaptive_localization_with_cutoff_0_equals_ESupdate(copy_case):
"""
Note that "RANDOM_SEED" in poly_loc_0.ert and poly_no_loc.ert needs to be the same to obtain
Note that "RANDOM_SEED" in poly_loc_0.ert and poly_no_loc.ert needs to be the same to obtain

Check failure on line 71 in tests/unit_tests/analysis/test_adaptive_localization.py

View workflow job for this annotation

GitHub Actions / annotate-python-linting

line too long (96 > 79 characters)
the same sample from the prior.
"""
copy_case("poly_example")
Expand All @@ -89,7 +88,7 @@ def test_that_adaptive_localization_with_cutoff_0_equals_ESupdate(copy_case):
with open("poly_no_loc.ert", "w") as f:
f.writelines(lines)

lines.insert(10, set_adaptive_localization_0)
lines.insert(9, set_adaptive_localization_0)

with open("poly_loc_0.ert", "w") as f:
f.writelines(lines)
Expand All @@ -99,4 +98,3 @@ def test_that_adaptive_localization_with_cutoff_0_equals_ESupdate(copy_case):

# Check posterior sample without adaptive localization and with cut-off 0 are equal

Check failure on line 99 in tests/unit_tests/analysis/test_adaptive_localization.py

View workflow job for this annotation

GitHub Actions / annotate-python-linting

line too long (87 > 79 characters)
assert np.array_equal(posterior_sample_loc0, posterior_sample_noloc)

0 comments on commit ad3ecb8

Please sign in to comment.