Skip to content

Commit 07d09b6

Browse files
author
Dimitar Topuzov
committed
Fix tests
1 parent a60d585 commit 07d09b6

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

helpers/_os_lib.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
import fileinput
12
import os, threading, psutil, time, shutil
23
import platform
34
import tarfile
4-
import fileinput
55
from time import sleep
66

77

@@ -153,6 +153,9 @@ def ExtractArchive(fileName, folder):
153153
def replace(filePath, str1, str2):
154154
for line in fileinput.input(filePath, inplace = 1):
155155
print line.replace(str1, str2)
156+
sleep(1)
157+
output = runAUT("cat " + filePath);
158+
assert (str2 in output)
156159

157160
def catAppFile(platform, appName, filePath):
158161
if platform is "android":

helpers/_tns_lib.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import shutil
44

55
from helpers._os_lib import runAUT, FileExists, ExtractArchive
6+
from time import sleep
67

78

89
tnsPath = os.path.join('node_modules', '.bin', 'tns');
@@ -228,7 +229,8 @@ def LiveSync(platform=None, emulator=False, device=None, watch=False, path=None,
228229
assert ("Successfully transferred all project files." in output)
229230
assert ("Applying changes..." in output)
230231
assert ("Successfully synced application org.nativescript." in output)
231-
232+
sleep(10)
233+
232234
return output
233235

234236
def CreateProjectAndAddPlatform(projName, platform=None, frameworkPath=None, symlink=False):

0 commit comments

Comments
 (0)