summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael P. Soulier <msoulier@digitaltorque.ca>2018-09-13 14:56:09 -0400
committerMichael P. Soulier <msoulier@digitaltorque.ca>2018-09-13 14:56:09 -0400
commitde18ed2e5c330c599498e33c4a796f645ffad5bc (patch)
tree742d156266bdca429746e6ce9da2c48f978ed519
parent336d4e0b0e4dc38ca4b905a9d14aed56d9046a5e (diff)
downloadtftpy-de18ed2e5c330c599498e33c4a796f645ffad5bc.tar.gz
Fixing some broken test-cases.
-rw-r--r--Makefile1
-rw-r--r--t/test.py4
2 files changed, 3 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 12ea0cc..e76c448 100644
--- a/Makefile
+++ b/Makefile
@@ -13,6 +13,7 @@ sdist:
PYTHONPATH=$(PYTHONPATH) $(PY) setup.py sdist
test:
+ rm -rf /tmp/foo
PYTHONIOENCODING=$(PYTHONIOENCODING) PYTHONPATH=$(PYTHONPATH) $(PY) t/test.py $(TESTCASE) 2>&1 | tee test.log
clean:
diff --git a/t/test.py b/t/test.py
index 9ecce31..eb84457 100644
--- a/t/test.py
+++ b/t/test.py
@@ -211,7 +211,7 @@ class TestTftpyState(unittest.TestCase):
self.clientServerDownloadOptions({'tsize': 64*1024})
def testClientFileObject(self):
- output = open('/tmp/out', 'w')
+ output = open('/tmp/out', 'wb')
self.clientServerDownloadOptions({}, output)
def testClientServerBlksize(self):
@@ -222,7 +222,7 @@ class TestTftpyState(unittest.TestCase):
self.clientServerUploadOptions({})
def testClientServerUploadFileObj(self):
- fileobj = open('t/640KBFILE', 'r')
+ fileobj = open('t/640KBFILE', 'rb')
self.clientServerUploadOptions({}, input=fileobj)
def testClientServerUploadWithSubdirs(self):