Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#28 Test with both signed and unsigned values.
- Loading branch information
Showing
4 changed files
with
47 additions
and
13 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
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 |
---|---|---|
@@ -1,8 +1,21 @@ | ||
import pytest | ||
|
||
from umodbus import conf | ||
from umodbus.config import Config | ||
|
||
|
||
@pytest.fixture(scope='module', autouse=True) | ||
def enable_signed_values(request): | ||
""" Use signed values when running tests it this module. """ | ||
tmp = conf.SIGNED_VALUES | ||
conf.SIGNED_VALUES = False | ||
|
||
def fin(): | ||
conf.SIGNED_VALUES = tmp | ||
|
||
request.addfinalizer(fin) | ||
|
||
|
||
@pytest.fixture | ||
def config(): | ||
return Config() |
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