Skip to content

Commit

Permalink
Skip test on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
adamltyson committed Dec 15, 2023
1 parent 63e7bda commit 79f6a88
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/tests/test_general/test_system.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
import platform
import random
from pathlib import Path
from random import shuffle
Expand Down Expand Up @@ -254,6 +255,10 @@ def test_disk_free_gb_windows(mock_disk_usage):
assert free_space == 500000 / 1024**3


@pytest.mark.skipif(
platform.system() == "Windows",
reason="os.statvfs not available on Windows",
)
def test_disk_free_gb_linux(mock_statvfs):
with patch(
"brainglobe_utils.general.system.platform.system", return_value="Linux"
Expand All @@ -264,6 +269,10 @@ def test_disk_free_gb_linux(mock_statvfs):
assert free_space == (1024 * 1000) / 1024**3 # Free space in GB


@pytest.mark.skipif(
platform.system() == "Windows",
reason="os.statvfs not available on Windows",
)
def test_disk_free_gb_macos(mock_statvfs):
with patch(
"brainglobe_utils.general.system.platform.system",
Expand Down

0 comments on commit 79f6a88

Please sign in to comment.