We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e879798 commit bbdbeb7Copy full SHA for bbdbeb7
qrcode.png
-697 Bytes
qrcode/tests/test_module.py
@@ -3,6 +3,15 @@
3
import tempfile
4
from pathlib import Path
5
6
+import pytest
7
+
8
+try:
9
+ from PIL import Image, ImageDraw
10
11
+ PIL_NOT_INSTALLED = False
12
+except ImportError:
13
+ PIL_NOT_INSTALLED = True
14
15
16
def test_module_help():
17
"""Test that the module can be executed with the help flag."""
@@ -22,6 +31,7 @@ def test_module_help():
22
31
assert "--factory" in result.stdout
23
32
24
33
34
+@pytest.mark.skipif(PIL_NOT_INSTALLED, reason="PIL is not installed")
25
35
def test_module_generate_qrcode():
26
36
"""Test that the module can generate a QR code image."""
27
37
with tempfile.TemporaryDirectory() as temp_dir:
0 commit comments