We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e350d2d commit d58015fCopy full SHA for d58015f
test/util.py
@@ -20,7 +20,7 @@
20
21
22
import functools
23
-from os import rename
+from os import remove, rename
24
from os.path import isfile
25
from unittest import TestCase
26
@@ -57,8 +57,12 @@ class ServerTestCase(TestCase):
57
58
def setUp(self):
59
if isfile(self.known_hosts):
60
+ if isfile(self.known_hosts_backup):
61
+ remove(self.known_hosts_backup)
62
rename(self.known_hosts, self.known_hosts_backup)
63
64
def tearDown(self):
65
if isfile(self.known_hosts_backup):
66
+ if isfile(self.known_hosts):
67
+ remove(self.known_hosts)
68
rename(self.known_hosts_backup, self.known_hosts)
0 commit comments