ports/ftp/py-pyftpdlib/files/patch-test__test_contrib.py
Li-Wen Hsu 74ca516d44 - Tweak USE_PYTHON to -2.7 to match upstream compatibility
- Switch from distutils to easy_install (update pkg_plist to suit)
- Add OptionsNG for SENDFILE and OPENSSL support
- Add test: target to run unit tests
- Patch: setup.py
  - Add zip_safe=False to install egg uncompressed
  - Add test_suite for running unit tests via setup.py
- Patch: test/test_*
  - add path hacks to test WRKSRC sources

PR:		ports/171682
Submitted by:	Kubilay Kocak <koobs.freebsd@gmail.com>
2012-09-22 14:04:11 +00:00

26 lines
585 B
Python

--- ./test/test_contrib.py.orig 2012-01-26 05:16:27.000000000 +1100
+++ ./test/test_contrib.py 2012-09-15 01:25:10.000000000 +1000
@@ -37,6 +37,7 @@
import ftplib
import unittest
import os
+import sys
import random
import string
import warnings
@@ -56,10 +57,15 @@
except ImportError:
pass
+#Path hacks
+sys.path.insert(0, os.path.abspath('..'))
from pyftpdlib import ftpserver
from pyftpdlib.contrib import authorizers
from pyftpdlib.contrib import handlers
from pyftpdlib.contrib import filesystems
+
+#More hacks
+sys.path.append('.')
from test_ftpd import *