-
-
Notifications
You must be signed in to change notification settings - Fork 242
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #661 from casabre/main
Adding support for pyvisa_proxy #660
- Loading branch information
Showing
9 changed files
with
115 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,3 +20,5 @@ htmlcov/ | |
.mypy_cache/ | ||
pip-wheel-metadata/ | ||
.pytest_cache | ||
.venv/ | ||
venv/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,18 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/mirrors-isort | ||
rev: v5.5.3 | ||
hooks: | ||
- id: isort | ||
- repo: https://github.com/psf/black | ||
rev: 20.8b1 | ||
hooks: | ||
- id: black | ||
language_version: python3.7 | ||
- repo: https://gitlab.com/pycqa/flake8 | ||
rev: 3.8.3 | ||
hooks: | ||
- id: flake8 | ||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: v0.782 # Use the sha / tag you want to point at | ||
hooks: | ||
- id: mypy | ||
additional_dependencies: [numpy, typing_extensions] | ||
- repo: https://github.com/pre-commit/mirrors-isort | ||
rev: v5.5.3 | ||
hooks: | ||
- id: isort | ||
- repo: https://github.com/psf/black | ||
rev: 22.3.0 | ||
hooks: | ||
- id: black | ||
- repo: https://gitlab.com/pycqa/flake8 | ||
rev: 3.8.3 | ||
hooks: | ||
- id: flake8 | ||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: v0.782 # Use the sha / tag you want to point at | ||
hooks: | ||
- id: mypy | ||
additional_dependencies: [numpy, typing_extensions] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# -*- coding: utf-8 -*- | ||
""" | ||
""" | ||
from pyvisa import constants | ||
from pyvisa.highlevel import VisaLibraryBase | ||
from pyvisa.util import LibraryPath | ||
|
||
|
||
class FakeResource: | ||
def close(self): | ||
pass | ||
|
||
|
||
class FalseVISALib(VisaLibraryBase): | ||
pass | ||
|
||
@staticmethod | ||
def get_library_paths(): | ||
return (LibraryPath("unset"),) | ||
|
||
def _init(self): | ||
pass | ||
|
||
def open_resource(self, *args, **kwargs): | ||
self.open_resource_called = True | ||
return FakeResource() | ||
|
||
def open_default_resource_manager(self): | ||
return 1, constants.StatusCode.success | ||
|
||
def close(self, session): | ||
pass | ||
|
||
|
||
WRAPPER_CLASS = FalseVISALib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters