Improve unit-tests (#1479)

* tests were failing on windows and macos
* improve coverage
This commit is contained in:
Alexander Kukushkin
2020-04-09 10:34:35 +02:00
committed by GitHub
parent 369a93ce2a
commit 27cda08ece
5 changed files with 32 additions and 15 deletions
+5 -2
View File
@@ -1,6 +1,7 @@
import copy
import os
import socket
import tempfile
import unittest
from mock import Mock, patch, mock_open
@@ -57,8 +58,8 @@ config = {
"superuser": {"username": "user"},
"rewind": {"username": "user"},
},
"data_dir": "/tmp/data_dir",
"bin_dir": "/tmp/bin_dir",
"data_dir": os.path.join(tempfile.gettempdir(), "data_dir"),
"bin_dir": os.path.join(tempfile.gettempdir(), "bin_dir"),
"parameters": {
"unix_socket_directories": "."
},
@@ -84,6 +85,8 @@ files = []
def isfile_side_effect(arg):
if arg.endswith('.exe'):
arg = arg[:-4]
return arg in files