-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
in the middle of trying to fix nosetests (no more failures including …
…tests in ignore_these, but tests take >1000s
- Loading branch information
Showing
31 changed files
with
235 additions
and
189 deletions.
There are no files selected for viewing
File renamed without changes.
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
8 changes: 4 additions & 4 deletions
8
pyrpl/test/test_attribute.py → ignore_these/test_attribute.py
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
File renamed without changes.
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,34 @@ | ||
import logging | ||
logger = logging.getLogger(name=__name__) | ||
from pyrpl.test.test_base import TestPyrpl | ||
|
||
|
||
class TestInput(TestPyrpl): | ||
def setup(self): | ||
self.p = self.pyrpl | ||
self.sampler = self.r.sampler | ||
|
||
def teardown(self): | ||
pass | ||
|
||
def test_sampler(self): | ||
with self.pyrpl.asgs.pop('test_sampler') as asg: | ||
asg.setup(amplitude=0.5, | ||
offset = 0.1, | ||
frequency=500e3, | ||
waveform='sin', | ||
output_direct='off', | ||
trigger_source='immediately') | ||
# test sample function | ||
sample = getattr(self.sampler, asg.name) | ||
assert sample >= asg.offset - asg.amplitude, sample | ||
assert sample <= asg.offset + asg.amplitude, sample | ||
# test stats function | ||
mean, std, max, min = self.sampler.stats(asg.name, t=1.0) | ||
assert min <= mean, (mean, std, max, min) | ||
assert mean <= max, (mean, std, max, min) | ||
assert std <= (max-min)/2.0, (mean, std, max, min, (max-min)/2.0) | ||
assert max <= asg.offset + asg.amplitude, (mean, std, max, min, asg.offset + asg.amplitude) | ||
# needs a small margin to work properly because of rounding off towards negative values in asg | ||
assert min + 2.0**(-14) >= asg.offset - asg.amplitude, \ | ||
(mean, std, max, min, min + 2.0**(-14), asg.offset - asg.amplitude) |
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
4 changes: 2 additions & 2 deletions
4
pyrpl/test/test_ownership.py → ignore_these/test_ownership.py
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
10 changes: 5 additions & 5 deletions
10
pyrpl/test/test_proxyproperty.py → ignore_these/test_proxyproperty.py
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
6 changes: 3 additions & 3 deletions
6
pyrpl/test/test_registers.py → ignore_these/test_registers.py
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
Empty file.
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,12 @@ | ||
import logging | ||
logger = logging.getLogger(name=__name__) | ||
import time | ||
import numpy as np | ||
from pyrpl.async_utils import sleep as async_sleep | ||
from qtpy import QtCore, QtWidgets | ||
from pyrpl.test.test_base import TestPyrpl | ||
from pyrpl import APP | ||
from pyrpl.curvedb import CurveDB | ||
|
||
class TestModuleWidgets(TestPyrpl): | ||
OPEN_ALL_DOCKWIDGETS = True # forces all DockWidgets to become visible |
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
Oops, something went wrong.