Skip to content

Commit

Permalink
fix failing test cases
Browse files Browse the repository at this point in the history
Signed-off-by: Pradyot Ranjan <99216956+pradyotRanjan@users.noreply.github.com>
  • Loading branch information
prady0t committed Jun 23, 2024
1 parent db1ce57 commit ea07877
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/publish_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ jobs:
set -e -x
python -c "import pybamm; print(pybamm.IDAKLUSolver())"
echo {project}
# python -m pytest {project}
python -m pytest {project}
- name: Upload wheels for Linux
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -271,7 +271,7 @@ jobs:
set -e -x
python -c "import pybamm; print(pybamm.__file__); print(pybamm.IDAKLUSolver())"
python -c "import pybamm; print(pybamm.have_idaklu())"
python -m pytest {project}
python -m pytest {project}/tests/unit
- name: Upload wheels for macOS (amd64, arm64)
uses: actions/upload-artifact@v4
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/test_parameters/test_parameter_values.py
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ def lico2_diffusivity_Dualfoil1998_2D(c_s, T):

def test_process_interpolant_3D_from_csv(self):
name = "data_for_testing_3D"
path = os.path.join(pybamm.root_dir(), "tests", "unit", "test_parameters")
path = os.path.abspath(os.path.dirname(__file__))

processed = pybamm.parameters.process_3D_data_csv(name, path)
parameter_values = pybamm.ParameterValues({"interpolation": processed})
Expand Down Expand Up @@ -719,7 +719,7 @@ def test_process_interpolant_3D_from_csv(self):

def test_process_interpolant_2D_from_csv(self):
name = "data_for_testing_2D"
path = os.path.join(pybamm.root_dir(), "tests", "unit", "test_parameters")
path = os.path.abspath(os.path.dirname(__file__))

processed = pybamm.parameters.process_2D_data_csv(name, path)
parameter_values = pybamm.ParameterValues({"interpolation": processed})
Expand Down
8 changes: 4 additions & 4 deletions tests/unit/test_parameters/test_process_parameter_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
class TestProcessParameterData(TestCase):
def test_process_1D_data(self):
name = "lico2_ocv_example"
path = os.path.join(pybamm.root_dir(), "tests", "unit", "test_parameters")
path = os.path.join(pybamm.root_dir(),"..", "tests", "unit", "test_parameters")
processed = pybamm.parameters.process_1D_data(name, path)
self.assertEqual(processed[0], name)
self.assertIsInstance(processed[1], tuple)
Expand All @@ -22,7 +22,7 @@ def test_process_1D_data(self):

def test_process_2D_data(self):
name = "lico2_diffusivity_Dualfoil1998_2D"
path = os.path.join(pybamm.root_dir(), "tests", "unit", "test_parameters")
path = os.path.join(pybamm.root_dir(),"..", "tests", "unit", "test_parameters")
processed = pybamm.parameters.process_2D_data(name, path)
self.assertEqual(processed[0], name)
self.assertIsInstance(processed[1], tuple)
Expand All @@ -32,7 +32,7 @@ def test_process_2D_data(self):

def test_process_2D_data_csv(self):
name = "data_for_testing_2D"
path = os.path.join(pybamm.root_dir(), "tests", "unit", "test_parameters")
path = os.path.join(pybamm.root_dir(),"..", "tests", "unit", "test_parameters")
processed = pybamm.parameters.process_2D_data_csv(name, path)

self.assertEqual(processed[0], name)
Expand All @@ -43,7 +43,7 @@ def test_process_2D_data_csv(self):

def test_process_3D_data_csv(self):
name = "data_for_testing_3D"
path = os.path.join(pybamm.root_dir(), "tests", "unit", "test_parameters")
path = os.path.join(pybamm.root_dir(),"..", "tests", "unit", "test_parameters")
processed = pybamm.parameters.process_3D_data_csv(name, path)

self.assertEqual(processed[0], name)
Expand Down

0 comments on commit ea07877

Please sign in to comment.