aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_pyg.py
diff options
context:
space:
mode:
authorMatej Cepl <mcepl@cepl.eu>2015-01-06 10:32:53 +0100
committerMatej Cepl <mcepl@cepl.eu>2015-01-06 10:32:53 +0100
commiteaba469c08e6c4406704eb08aeb8e4e5650ea072 (patch)
treebafd87c3bd593ec42549e09763d6602c72b8dd73 /test/test_pyg.py
parent4a6c98c691e962b50b45faf75a07bd386021a4ad (diff)
downloadpygn-eaba469c08e6c4406704eb08aeb8e4e5650ea072.tar.gz
Fix working around Windows idiosyncracies.
Fixes #19
Diffstat (limited to 'test/test_pyg.py')
-rwxr-xr-xtest/test_pyg.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/test_pyg.py b/test/test_pyg.py
index 4c1c1c0..e6b8fca 100755
--- a/test/test_pyg.py
+++ b/test/test_pyg.py
@@ -28,9 +28,10 @@ one line test
def test_m2n(self):
with open('examples/mail') as in_mail:
- pid = subprocess.Popen(['./pygm2n', '-Tv', '-n', 'pyg.test'],
+ pid = subprocess.Popen(['python', 'pygm2n', '-Tv', '-n', 'pyg.test'],
stdin=subprocess.PIPE,
- stdout=subprocess.PIPE)
+ stdout=subprocess.PIPE,
+ universal_newlines=True)
out, _ = pid.communicate(in_mail.read())
self.assertEqual(out, self.expected_output)
@@ -58,11 +59,12 @@ Resent-Sender: sender@example.com
def test_n2m(self):
with open('examples/articletest.accepted') as in_mail:
- pid = subprocess.Popen(['./pygn2m', '-Tvt', 'test@example.com',
+ pid = subprocess.Popen(['python', 'pygn2m', '-Tvt', 'test@example.com',
'-s', 'sender@example.com',
'-w', 'examples/whitelist.example'],
stdin=subprocess.PIPE,
- stdout=subprocess.PIPE)
+ stdout=subprocess.PIPE,
+ universal_newlines=True)
in_message = in_mail.read().replace('pyg@pyg.server.tld',
'kame@inwind.it')
out, err = pid.communicate(in_message)