mirror of
https://github.com/eclipse/upm.git
synced 2025-03-14 20:47:30 +03:00
tests: harden tests for handling universal line endings
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:
parent
874eacf12e
commit
0cb7d3f9b4
@ -29,7 +29,7 @@ class AutoLoadLibrary(u.TestCase):
|
||||
moduleName = fileName[:-2]
|
||||
snippet = prefix + moduleName + suffix
|
||||
|
||||
with open(os.path.join(subdir, fileName), "r") as f:
|
||||
with open(os.path.join(subdir, fileName), "rU") as f:
|
||||
#read in entire file
|
||||
data = f.read()
|
||||
#Make sure it is module
|
||||
|
@ -14,7 +14,7 @@ class BlacklistConsistency(u.TestCase):
|
||||
def test_java_blacklist(self):
|
||||
|
||||
with open(javaBlacklistFile) as f:
|
||||
blacklist = [line.rstrip('\n') for line in f]
|
||||
blacklist = [line.rstrip('\r\n') for line in f]
|
||||
|
||||
for libraryName in blacklist:
|
||||
files = os.listdir( os.path.join(rootDir, libraryName))
|
||||
@ -29,7 +29,7 @@ class BlacklistConsistency(u.TestCase):
|
||||
def test_python_blacklist(self):
|
||||
|
||||
with open(pythonBlacklistFile) as f:
|
||||
blacklist = [line.rstrip('\n') for line in f]
|
||||
blacklist = [line.rstrip('\r\n') for line in f]
|
||||
|
||||
for libraryName in blacklist:
|
||||
files = os.listdir( os.path.join(rootDir, libraryName))
|
||||
@ -44,7 +44,7 @@ class BlacklistConsistency(u.TestCase):
|
||||
def test_node_blacklist(self):
|
||||
|
||||
with open(nodeBlacklistFile) as f:
|
||||
blacklist = [line.rstrip('\n') for line in f]
|
||||
blacklist = [line.rstrip('\r\n') for line in f]
|
||||
|
||||
for libraryName in blacklist:
|
||||
files = os.listdir( os.path.join(rootDir, libraryName))
|
||||
|
Loading…
x
Reference in New Issue
Block a user