Skip to content

Commit

Permalink
fixing windows test errors
Browse files Browse the repository at this point in the history
  • Loading branch information
santacodes committed Jun 24, 2024
1 parent 601df87 commit d73b574
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/test_entry_points.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down

0 comments on commit d73b574

Please sign in to comment.