Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add test_lazy_imports
  • Loading branch information
AA-Turner committed Apr 21, 2025
commit 4a640ce2f34753d8c0c55f3cecdaa1f406f3dd00
4 changes: 4 additions & 0 deletions Lib/test/test_shlex.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import shlex
import string
import unittest
from test.support import import_helper


# The original test data set was from shellwords, by Hartmut Goebel.
Expand Down Expand Up @@ -363,6 +364,9 @@ def testPunctuationCharsReadOnly(self):
with self.assertRaises(AttributeError):
shlex_instance.punctuation_chars = False

def test_lazy_imports(self):
import_helper.ensure_lazy_imports('shlex', {'collections', 're', 'os'})


# Allow this test to be used with old shlex.py
if not getattr(shlex, "split", None):
Expand Down