Send a query and check that the answer contains the string. :type command: str :type read_termination: str | None :type expected: str | None
(self, command, read_termination=None, expected='ok')
| 54 | return super().query(command, send_args=send_args, recv_args=recv_args) |
| 55 | |
| 56 | def query_expect(self, command, read_termination=None, expected='ok'): |
| 57 | """Send a query and check that the answer contains the string. |
| 58 | |
| 59 | :type command: str |
| 60 | :type read_termination: str | None |
| 61 | :type expected: str | None |
| 62 | """ |
| 63 | if command and not self.recall('remote'): |
| 64 | self.log_info('Setting Remote.') |
| 65 | self.remote = True |
| 66 | self.resource.write(command) |
| 67 | ans = self.read(read_termination) |
| 68 | if expected and not expected in ans: |
| 69 | raise InstrumentError("'{}' not in '{}'".format(expected, ans)) |
| 70 | return ans |
| 71 | |
| 72 | @Action() |
| 73 | def clear(self): |
no test coverage detected