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

fix test paths to examples.

parent 40787891
......@@ -44,7 +44,7 @@ if __name__ == '__main__':
sys.path.append('.')
base = os.path.dirname(gevent.__file__)
print(base)
os.chdir('..')
os.chdir('../..')
globs = {'myfunction': myfunction, 'gevent': gevent, 'socket': socket}
......
......@@ -17,7 +17,7 @@ class Test_udp_client(TestCase):
server = DatagramServer('127.0.0.1:9000', handle)
server.start()
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:
server.close()
self.assertEqual(log, [b'Test_udp_client'])
......
......@@ -5,7 +5,7 @@ import time
import util
cwd = '../examples/'
cwd = '../../examples/'
ignore = ['wsgiserver.py',
'wsgiserver_ssl.py',
'webproxy.py',
......@@ -24,7 +24,7 @@ time_ranges = {
def main(tests=None):
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)
failed = []
......
......@@ -209,7 +209,7 @@ def run(command, **kwargs):
class TestServer(unittest.TestCase):
cwd = '../examples/'
cwd = '../../examples/'
args = []
before_delay = 3
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