diff options
author | Ben Finney <ben+python@benfinney.id.au> | 2015-10-28 15:56:59 +1100 |
---|---|---|
committer | Ben Finney <ben+python@benfinney.id.au> | 2015-10-28 15:56:59 +1100 |
commit | 27dd6631dbc55d86d42399ab488b840d25beee6e (patch) | |
tree | 742da893166b3490e4bdab26c2ee45d7c9f6a457 | |
parent | 420db239e290401c3ddbf4bcde52708f53d830b5 (diff) | |
download | python-coveragepy-git-27dd6631dbc55d86d42399ab488b840d25beee6e.tar.gz |
Make an equivalent to ‘shlex.quote’ available in Python < 3.3.
-rw-r--r-- | tests/coveragetest.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/coveragetest.py b/tests/coveragetest.py index 0e9076cc..05a7dc4a 100644 --- a/tests/coveragetest.py +++ b/tests/coveragetest.py @@ -10,6 +10,14 @@ import os import random import re import shlex +try: + shlex.quote +except AttributeError: + # Useful function, available under a different (undocumented) name + # in Python versions earlier than 3.3. + import pipes + shlex.quote = pipes.quote + del pipes import shutil import sys |