Commit 5e2748c1 authored by Jason Madden's avatar Jason Madden

fix test paths to examples.

parent 40787891
...@@ -44,7 +44,7 @@ if __name__ == '__main__': ...@@ -44,7 +44,7 @@ if __name__ == '__main__':
sys.path.append('.') sys.path.append('.')
base = os.path.dirname(gevent.__file__) base = os.path.dirname(gevent.__file__)
print(base) print(base)
os.chdir('..') os.chdir('../..')
globs = {'myfunction': myfunction, 'gevent': gevent, 'socket': socket} globs = {'myfunction': myfunction, 'gevent': gevent, 'socket': socket}
......
...@@ -17,7 +17,7 @@ class Test_udp_client(TestCase): ...@@ -17,7 +17,7 @@ class Test_udp_client(TestCase):
server = DatagramServer('127.0.0.1:9000', handle) server = DatagramServer('127.0.0.1:9000', handle)
server.start() server.start()
try: try:
run([sys.executable, '-u', 'udp_client.py', 'Test_udp_client'], timeout=10, cwd='../examples/') run([sys.executable, '-u', 'udp_client.py', 'Test_udp_client'], timeout=10, cwd='../../examples/')
finally: finally:
server.close() server.close()
self.assertEqual(log, [b'Test_udp_client']) self.assertEqual(log, [b'Test_udp_client'])
......
...@@ -5,7 +5,7 @@ import time ...@@ -5,7 +5,7 @@ import time
import util import util
cwd = '../examples/' cwd = '../../examples/'
ignore = ['wsgiserver.py', ignore = ['wsgiserver.py',
'wsgiserver_ssl.py', 'wsgiserver_ssl.py',
'webproxy.py', 'webproxy.py',
...@@ -24,7 +24,7 @@ time_ranges = { ...@@ -24,7 +24,7 @@ time_ranges = {
def main(tests=None): def main(tests=None):
if not tests: if not tests:
tests = set(os.path.basename(x) for x in glob.glob('../examples/*.py')) tests = set(os.path.basename(x) for x in glob.glob(cwd + '/*.py'))
tests = sorted(tests) tests = sorted(tests)
failed = [] failed = []
......
...@@ -209,7 +209,7 @@ def run(command, **kwargs): ...@@ -209,7 +209,7 @@ def run(command, **kwargs):
class TestServer(unittest.TestCase): class TestServer(unittest.TestCase):
cwd = '../examples/' cwd = '../../examples/'
args = [] args = []
before_delay = 3 before_delay = 3
after_delay = 0.5 after_delay = 0.5
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment