Skip to content

Commit

Permalink
Formatting enhanced
Browse files Browse the repository at this point in the history
Resolved comment
  • Loading branch information
franz-sweepMe committed Jan 16, 2024
1 parent 5748311 commit 3c01541
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
1 change: 1 addition & 0 deletions src/Logger-MCC_DAQ/libraries/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mcculw==1.0.0
16 changes: 7 additions & 9 deletions tests/importability/import_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,16 @@ def is_compatible(driver_name: str) -> bool:

# Driver name and reason for skipping
SKIPPED_DRIVERS = {
"Logger-MCC_DAQ" : "Driver requires installed manufacturer software",
"Logger-MCC_DAQ": "Driver requires installed manufacturer software",
}


def should_skip_driver(driver_name: str) -> bool:
"""Check if the driver can be tested on a virtual machine.
Args:
driver_name: Name (folder) of the driver to import.
"""
Args:
driver_name: Name (folder) of the driver to import.
"""
if SKIPPED_DRIVERS.get(driver_name) is not None:
logging.debug(
f"Skipped importing {driver_name}. Reason: {SKIPPED_DRIVERS[driver_name]}",
Expand Down Expand Up @@ -110,14 +111,11 @@ def import_driver(driver_name: str) -> None:
msg = "This script must be called with the driver name as first argument."
raise IndexError(msg) from e


if not is_compatible(driver_name):
logging.debug(
f"Skipped importing {driver_name} because it is not meant to be compatible with this python version.",
)
elif should_skip_driver(driver_name):
logging.debug(
f"Skipped importing {driver_name} because it cannot be tested.",
)
pass
else:
import_driver(driver_name)
import_driver(driver_name)

0 comments on commit 3c01541

Please # to comment.