diff --git a/neutron_lib/tests/_tools.py b/neutron_lib/tests/_tools.py index 5e58d18bf..eb4ff0802 100644 --- a/neutron_lib/tests/_tools.py +++ b/neutron_lib/tests/_tools.py @@ -14,6 +14,7 @@ # under the License. import fixtures +import platform import warnings from neutron_lib.utils import helpers @@ -44,3 +45,14 @@ class WarningsFixture(fixtures.Fixture): for wtype in self.warning_types: warnings.filterwarnings( "always", category=wtype, module='^neutron_lib\\.') + + +def is_bsd(): + """Return True on BSD-based systems.""" + + system = platform.system() + if system == 'Darwin': + return True + if 'bsd' in system.lower(): + return True + return False