Changeset 60ed7d1 in mod_gnutls
- Timestamp:
- Jan 9, 2020, 11:43:02 AM (13 months ago)
- Branches:
- asyncio, master, proxy-ticket
- Children:
- ff039b1
- Parents:
- 7e10018
- Location:
- test
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
test/mgstest/hooks.py
r7e10018 r60ed7d1 30 30 2. Set any additional environment variables the test might 31 31 need. 32 33 If the hook creates any resources that need to be cleaned up 34 after the test (e.g. delete a temporary file), it should 35 return a callable which performs the cleanup. That callable 36 will be called without arguments when the test services are 37 stopped. 32 38 33 39 run_connection: -
test/runtest.py
r7e10018 r60ed7d1 136 136 137 137 # This hook may modify the environment as needed for the test. 138 cleanup_callback = None 138 139 try: 139 140 if plugin.prepare_env: 140 plugin.prepare_env()141 cleanup_callback = plugin.prepare_env() 141 142 except SkipTest as skip: 142 143 print(f'Skipping: {skip!s}') … … 148 149 149 150 with contextlib.ExitStack() as service_stack: 151 if cleanup_callback: 152 service_stack.callback(cleanup_callback) 150 153 service_stack.enter_context(lockfile('test.lock', nolock='MGS_NETNS_ACTIVE' in os.environ)) 151 154 service_stack.enter_context(ocsp.run())
Note: See TracChangeset
for help on using the changeset viewer.