From e98686197ebd49a4f33990dc5871768d251b6874 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner <inform@tiker.net> Date: Sun, 28 Jul 2019 17:18:15 -0500 Subject: [PATCH] Rename test_flux_data_fixture -> flux_test_data_fixture to avoid pytest confusion --- data_for_test.py | 2 +- test.py | 36 ++++++++++++++++++------------------ 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/data_for_test.py b/data_for_test.py index 8390952..c83dd53 100644 --- a/data_for_test.py +++ b/data_for_test.py @@ -705,7 +705,7 @@ single_data["Case d:z"] = FluxDataSingle( "Case b:x", "Case b:y", "Case b:z", "Case c:x", "Case c:y", "Case c:z", "Case d:x", "Case d:y", "Case d:z"]) -def test_flux_data_fixture(request): +def flux_test_data_fixture(request): return single_data[request.param] diff --git a/test.py b/test.py index be05de0..8ee0e49 100644 --- a/test.py +++ b/test.py @@ -15,11 +15,11 @@ from pyopencl.tools import ( # noqa as pytest_generate_tests) import utilities as u -from data_for_test import test_flux_data_fixture # noqa: F401 +from data_for_test import flux_test_data_fixture # noqa: F401 -def test_weno_flux_uniform_grid(ctx_factory, test_flux_data_fixture): - data = test_flux_data_fixture +def test_weno_flux_uniform_grid(ctx_factory, flux_test_data_fixture): + data = flux_test_data_fixture prg = u.get_weno_program_with_root_kernel("weno_flux") queue = u.get_queue(ctx_factory) @@ -37,8 +37,8 @@ def test_weno_flux_uniform_grid(ctx_factory, test_flux_data_fixture): u.compare_arrays(flux_dev.get(), data.weno_flux) -def test_consistent_part_uniform_grid(ctx_factory, test_flux_data_fixture): - data = test_flux_data_fixture +def test_consistent_part_uniform_grid(ctx_factory, flux_test_data_fixture): + data = flux_test_data_fixture prg = u.get_weno_program_with_root_kernel("consistent_part") queue = u.get_queue(ctx_factory) @@ -52,8 +52,8 @@ def test_consistent_part_uniform_grid(ctx_factory, test_flux_data_fixture): u.compare_arrays(consistent_dev.get(), data.consistent) -def test_dissipation_part_pos_uniform_grid(ctx_factory, test_flux_data_fixture): - data = test_flux_data_fixture +def test_dissipation_part_pos_uniform_grid(ctx_factory, flux_test_data_fixture): + data = flux_test_data_fixture prg = u.get_weno_program_with_root_kernel("dissipation_part_pos") queue = u.get_queue(ctx_factory) @@ -69,8 +69,8 @@ def test_dissipation_part_pos_uniform_grid(ctx_factory, test_flux_data_fixture): u.compare_arrays(dissipation_dev.get(), data.dissipation_pos) -def test_dissipation_part_neg_uniform_grid(ctx_factory, test_flux_data_fixture): - data = test_flux_data_fixture +def test_dissipation_part_neg_uniform_grid(ctx_factory, flux_test_data_fixture): + data = flux_test_data_fixture prg = u.get_weno_program_with_root_kernel("dissipation_part_neg") queue = u.get_queue(ctx_factory) @@ -86,8 +86,8 @@ def test_dissipation_part_neg_uniform_grid(ctx_factory, test_flux_data_fixture): u.compare_arrays(dissipation_dev.get(), data.dissipation_neg) -def test_weno_weights_pos_uniform_grid(ctx_factory, test_flux_data_fixture): - data = test_flux_data_fixture +def test_weno_weights_pos_uniform_grid(ctx_factory, flux_test_data_fixture): + data = flux_test_data_fixture prg = u.get_weno_program_with_root_kernel("weno_weights_pos") queue = u.get_queue(ctx_factory) @@ -102,8 +102,8 @@ def test_weno_weights_pos_uniform_grid(ctx_factory, test_flux_data_fixture): u.compare_arrays(weights_dev.get(), data.weno_weights_pos) -def test_weno_weights_neg_uniform_grid(ctx_factory, test_flux_data_fixture): - data = test_flux_data_fixture +def test_weno_weights_neg_uniform_grid(ctx_factory, flux_test_data_fixture): + data = flux_test_data_fixture prg = u.get_weno_program_with_root_kernel("weno_weights_neg") queue = u.get_queue(ctx_factory) @@ -118,8 +118,8 @@ def test_weno_weights_neg_uniform_grid(ctx_factory, test_flux_data_fixture): u.compare_arrays(weights_dev.get(), data.weno_weights_neg) -def test_flux_splitting_uniform_grid(ctx_factory, test_flux_data_fixture): - data = test_flux_data_fixture +def test_flux_splitting_uniform_grid(ctx_factory, flux_test_data_fixture): + data = flux_test_data_fixture prg = u.get_weno_program_with_root_kernel("split_characteristic_fluxes") queue = u.get_queue(ctx_factory) @@ -140,7 +140,7 @@ def test_flux_splitting_uniform_grid(ctx_factory, test_flux_data_fixture): def test_pointwise_eigenvalues_ideal_gas(ctx_factory, data): - data = test_flux_data_fixture + data = flux_test_data_fixture prg = u.get_weno_program_with_root_kernel("pointwise_eigenvalues") queue = u.get_queue(ctx_factory) @@ -153,8 +153,8 @@ def test_pointwise_eigenvalues_ideal_gas(ctx_factory, data): u.compare_arrays(lam_dev.get(), data.lam_pointwise) -def test_roe_uniform_grid_ideal_gas(ctx_factory, test_flux_data_fixture): - data = test_flux_data_fixture +def test_roe_uniform_grid_ideal_gas(ctx_factory, flux_test_data_fixture): + data = flux_test_data_fixture def identity_matrix(n): return np.identity(n).astype(np.float32).copy(order="F") -- GitLab