Skip to content

Commit

Permalink
Merge pull request #2931 from zm711/fix-neo-test-macs
Browse files Browse the repository at this point in the history
Add Mac skip for plexon2 Neo test
  • Loading branch information
alejoe91 authored May 30, 2024
2 parents 46734eb + 11e9b1b commit ff25b20
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/spikeinterface/extractors/tests/test_neoextractors.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,12 @@ def has_plexon2_dependencies():
# On Windows, no need for additional dependencies
return True

elif os_type == "Linux":
# Check for 'wine' using dpkg
try:
result_wine = subprocess.run(
["dpkg", "-l", "wine"], stdout=subprocess.PIPE, stderr=subprocess.PIPE, check=True
)
except subprocess.CalledProcessError:
elif os_type == "Linux" or os_type == "Darwin":
# Check for 'wine' using which. "which" works for both mac and linux
# if package exists it returns a 0. Anything else is an error code.

result_wine = subprocess.run(["which", "wine"], stdout=subprocess.PIPE, stderr=subprocess.PIPE, check=False)
if result_wine.returncode != 0:
return False

# Check for 'zugbruecke' using pip
Expand All @@ -48,7 +47,6 @@ def has_plexon2_dependencies():
except ImportError:
return False
else:
# Not sure about MacOS
raise ValueError(f"Unsupported OS: {os_type}")


Expand Down

0 comments on commit ff25b20

Please sign in to comment.