diff -r 811ccdee6f87 Lib/test/test_pipes.py --- a/Lib/test/test_pipes.py Wed May 04 09:44:44 2016 +0300 +++ b/Lib/test/test_pipes.py Thu May 05 09:58:33 2016 +0200 @@ -1,5 +1,6 @@ import pipes import os +import sys import string import unittest from test.support import TESTFN, run_unittest, unlink, reap_children @@ -9,8 +10,9 @@ TESTFN2 = TESTFN + "2" -# tr a-z A-Z is not portable, so make the ranges explicit -s_command = 'tr %s %s' % (string.ascii_lowercase, string.ascii_uppercase) +# A filter command to swap the case. +s_command = (("%s -c \"import sys; exec('for s in sys.stdin.read(): " + "sys.stdout.write(s.swapcase())')\"") % sys.executable) class SimplePipeTests(unittest.TestCase): def tearDown(self):