Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test suite and BFs for TekDPO70000 (#256)
* Test suite and BFs for TekDPO70000 **Bug Fixes**: - Two properties were called as `unitful_property` instead of `enum_property`. As the "unit", an enum was given. Seems to be a copy&paste error. - The second of these properties also had the wrong enum specified. Swapped out for correct enum. - Double checked all fixes with manual. **Test suite**: - Full, and likely overkill, test suite added (needs discussion). - One test that is intentionally skipped added for binary waveform reading (needs discussion). - Full coverage not achieved. * Remove `if self._testing` to skip `time.sleep` in tests, replace w/ mock Also assert that time.sleep is called in the main routine, since it is required by the instrument. * Change TekDPO70000 to always read termination character after waveform The loopback communicator used in testing does not flush the input, thus a termination character is stuck in the queue that does not get read. According to the manual, a `<newline>` character is always sent after transmitting the waveform. Flushing the input is now simplified and includes a `read_raw` for one character. This takes care of proper testing. Tests were adjusted accordingly. * Removed unnecessary `@pytest.mark.parametrize` statements for channels Testing of all channels is not necessary for property factories and should be shifted to their tests. Test suites still checks that `sendcmd` and `query` are working properly for all parametrized scenarios.
- Loading branch information