Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark RXD test as skip on Ubuntu 22+ #3080

Merged
merged 9 commits into from
Sep 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 32 additions & 1 deletion test/rxd/3d/test_multi_gridding_mix.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,41 @@
from neuron.units import µm, mM, ms, mV
import platform
import sys

import pytest
from packaging.version import Version

from neuron.units import µm, mM, ms, mV

sys.path.append("..")
from testutils import compare_data, tol


def check_platform_is_problematic():
"""
Check whether the current platform is problematic so tests are skipped.
"""
if platform.system() == "Linux":
# `freedesktop_os_release` is only defined in 3.10+
if hasattr(platform, "freedesktop_os_release"):
try:
flavor = platform.freedesktop_os_release()
return flavor["ID"] == "ubuntu" and Version(
flavor["VERSION_ID"]
) > Version("22")
except OSError:
# we cannot determine the flavor reliably (no /etc/os-release file)
return True
else:
# we cannot determine the flavor reliably (<3.10)
return True
else:
return False


@pytest.mark.skipif(
check_platform_is_problematic(),
reason="See https://github.com/neuronsimulator/nrn-build-ci/issues/66",
)
def test_multi_gridding_mix(neuron_instance):
h, rxd, data, save_path = neuron_instance
axon = h.Section(name="axon")
Expand Down
Loading