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():