From d73b574530ccea6e2840df5c83c582afb766cfde Mon Sep 17 00:00:00 2001 From: Santhosh Sundaram Date: Mon, 24 Jun 2024 21:45:31 +0530 Subject: [PATCH] fixing windows test errors --- tests/test_entry_points.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/test_entry_points.py b/tests/test_entry_points.py index 3c6e374..a2ee28c 100644 --- a/tests/test_entry_points.py +++ b/tests/test_entry_points.py @@ -3,15 +3,18 @@ import importlib.util import sys from pathlib import Path +import os def test_entry_points(): """Testing if the entry points are loading right""" entry_points = list(pybamm_cookiecutter.parameter_sets) parameter_sets = Path("src/pybamm_cookiecutter/parameters/input/").glob("*.py") + if os.name == 'posix': # Making a list Parameter sets in the parameters/input directory - parameter_sets = [str(x).split('/')[-1].split('.py')[0] for x in parameter_sets] - + parameter_sets = [str(x).split('/')[-1].split('.py')[0] for x in parameter_sets] + elif os.name == 'nt': + parameter_sets = [str(x).split('//')[-1].split('.py')[0] for x in parameter_sets] assert parameter_sets == entry_points, "Entry points missing either in pyproject.toml or in the input directory" def test_entry_point_load():