test_example.py 244 B

12345678910111213
  1. from unittest import mock
  2. import pytest
  3. from qrcode import run_example
  4. pytest.importorskip("PIL", reason="Requires PIL")
  5. @mock.patch("PIL.Image.Image.show")
  6. def test_example(mock_show):
  7. run_example()
  8. mock_show.assert_called_with()