Test that `stream=False` does not return a stream.
(self)
| 82 | self.assertIsInstance(chunk, str, "streams output") |
| 83 | |
| 84 | def test_stream_false_does_not_stream(self): |
| 85 | """Test that `stream=False` does not return a stream.""" |
| 86 | result = model.run("Jack and jill", stream=False) |
| 87 | |
| 88 | self.assertIsNone(result.error) |
| 89 | self.assertIsInstance(result.output, str, "returns output") |
| 90 | |
| 91 | result = model.run("Jack and jill", {"max_length": 100}, stream=False) |
| 92 | |
| 93 | self.assertIsNone(result.error) |
| 94 | self.assertIsInstance(result.output, str, "returns output") |
| 95 | |
| 96 | if __name__ == "__main__": |
| 97 | unittest.main() |