4 ms·
Building a Small REPL in Python
- westurner 3y agoBut then what about tests? https://github.com/4dsolutions/python_camp/pull/4/files https://github.com/4dsolutions/python_camp/pull/4/files : class TestCalculatorREPL(unittest.TestCase): from unittest.mock import patch @patch("sys.stdin", StringIO("1")) @patch("sys.stdout", new_callable=StringIO) def test__(): pass
- tekknolagi 3y agoOoh, this is interesting. Thanks for the tip. The rest of the project is well-tested but I've been cowboy developing the REPL.