Skip to content

Add REPL integration tests using I/O mocks #75

@tekknolagi

Description

@tekknolagi

https://news.ycombinator.com/item?id=38449933

  class TestCalculatorREPL(unittest.TestCase):
      pass

  from unittest.mock import patch

  @patch("sys.stdin", StringIO("1"))
  @patch("sys.stdout", new_callable=StringIO)
  def test__():
      pass

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions