summaryrefslogtreecommitdiff
path: root/src/integration-tests/test_integration_reconnect_nat.py.in
diff options
context:
space:
mode:
Diffstat (limited to 'src/integration-tests/test_integration_reconnect_nat.py.in')
-rwxr-xr-xsrc/integration-tests/test_integration_reconnect_nat.py.in25
1 files changed, 12 insertions, 13 deletions
diff --git a/src/integration-tests/test_integration_reconnect_nat.py.in b/src/integration-tests/test_integration_reconnect_nat.py.in
index 45626d50d..751a0484b 100755
--- a/src/integration-tests/test_integration_reconnect_nat.py.in
+++ b/src/integration-tests/test_integration_reconnect_nat.py.in
@@ -32,7 +32,6 @@ from gnunet_testing import Check
from gnunet_testing import Condition
from gnunet_testing import *
-
#
# This test tests if a fresh peer bootstraps from a hostlist server and then
# successfully connects to the server. When both peers are connected
@@ -43,7 +42,6 @@ from gnunet_testing import *
# definitions
-
testname = "test_integration_restart"
verbose = True
check_timeout = 180
@@ -82,7 +80,7 @@ def cleanup():
retries = 10
path = os.path.join(tmp, "c_nat_client")
test.p("Removing " + path)
- while((os.path.exists(path)) and(retries > 0)):
+ while ((os.path.exists(path)) and (retries > 0)):
shutil.rmtree((path), False, cleanup_onerror)
time.sleep(1)
retries -= 1
@@ -91,18 +89,18 @@ def cleanup():
def success_restart_cont(check):
- global success
- print('Peers connected successfully after restart')
- server.stop()
- client.stop()
- success = True
+ global success
+ print('Peers connected successfully after restart')
+ server.stop()
+ client.stop()
+ success = True
def fail_restart_cont(check):
- global success
- success = False
- print('Peers failed to connect after restart')
- check.evaluate(True)
+ global success
+ success = False
+ print('Peers failed to connect after restart')
+ check.evaluate(True)
def success_connect_cont(check):
@@ -151,6 +149,7 @@ def check_connect():
check.run_blocking(check_timeout, success_connect_cont, fail_connect_cont)
+
#
# Test execution
#
@@ -227,7 +226,7 @@ def run():
try:
run()
-except(KeyboardInterrupt, SystemExit):
+except (KeyboardInterrupt, SystemExit):
print('Test interrupted')
server.stop()
client.stop()