Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

Commit a279ec6

Browse files
committed
Catch ImportError
The handling is probably incorrect, but on the platforms I'm testing on this test is skipped anyway -- this just allows a simple `python -m pytest` to succeed
1 parent b98e6f4 commit a279ec6

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

tests/test_stdin.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
"""Tests for polyfill's stdin monkey patching."""
22
import flake8
3-
import pep8
4-
import pycodestyle
53
import pytest
4+
try:
5+
import pep8
6+
except ImportError:
7+
pep8 = None
8+
9+
try:
10+
import pycodestyle
11+
except ImportError:
12+
pycodestyle = None
613

714
from flake8_polyfill import stdin
815
from flake8_polyfill import version

0 commit comments

Comments
 (0)