Skip to content

Commit

Permalink
tests: skip tests where device cannot be found
Browse files Browse the repository at this point in the history
  • Loading branch information
thijstriemstra committed Oct 26, 2024
1 parent f5f5d7f commit e9e782a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test_cmdline.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2017-2021 Richard Hull and contributors
# Copyright (c) 2017-2024 Richard Hull and contributors
# See LICENSE.rst for details.

"""
Expand Down Expand Up @@ -191,7 +191,7 @@ def test_make_interface_spi():
except ImportError:
# non-rpi platform, e.g. macos
pytest.skip(rpi_gpio_missing)
except error.UnsupportedPlatform as e:
except (error.UnsupportedPlatform, error.DeviceNotFoundError) as e:
# non-rpi platform, e.g. ubuntu 64-bit
skip_unsupported_platform(e)

Expand All @@ -211,7 +211,7 @@ class opts(test_spi_opts):
except ImportError:
# non-rpi platform, e.g. macos
pytest.skip(rpi_gpio_missing)
except error.UnsupportedPlatform as e:
except (error.UnsupportedPlatform, error.DeviceNotFoundError) as e:
# non-rpi platform, e.g. ubuntu 64-bit
skip_unsupported_platform(e)

Expand Down Expand Up @@ -341,7 +341,7 @@ class args(test_spi_opts):
assert device == display_name
except ImportError:
pytest.skip(rpi_gpio_missing)
except error.UnsupportedPlatform as e:
except (error.UnsupportedPlatform, error.DeviceNotFoundError) as e:
# non-rpi platform
skip_unsupported_platform(e)

Expand Down

0 comments on commit e9e782a

Please sign in to comment.