mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 23:58:20 +00:00
Add no-coverage markers to Windows-specific code.
It won't be reached. Also, simplify the expected errors line to make it shorter.
This commit is contained in:
parent
acd6264cd8
commit
9b812a2d2a
2 changed files with 4 additions and 4 deletions
|
@ -1356,7 +1356,7 @@ def llListSort(lst, stride, asc):
|
||||||
if broken and ta in (unicode, Key):
|
if broken and ta in (unicode, Key):
|
||||||
# Note this breaks type consistency between a and ta!
|
# Note this breaks type consistency between a and ta!
|
||||||
# It should be OK because only equal types are compared.
|
# It should be OK because only equal types are compared.
|
||||||
a = a.encode('utf-32-be')
|
a = a.encode('utf-32-be') # pragma: no cover
|
||||||
for j in xrange(i+stride, L, stride):
|
for j in xrange(i+stride, L, stride):
|
||||||
b = lst[j]
|
b = lst[j]
|
||||||
tb = type(b)
|
tb = type(b)
|
||||||
|
@ -1368,7 +1368,7 @@ def llListSort(lst, stride, asc):
|
||||||
# (note NaNs compare as > thus the reversed condition!)
|
# (note NaNs compare as > thus the reversed condition!)
|
||||||
elif tb != Quaternion:
|
elif tb != Quaternion:
|
||||||
if broken and tb in (unicode, Key):
|
if broken and tb in (unicode, Key):
|
||||||
b = b.encode('utf-32-be')
|
b = b.encode('utf-32-be') # pragma: no cover
|
||||||
gt = not (a <= b) # float, integer, string, key all take this branch
|
gt = not (a <= b) # float, integer, string, key all take this branch
|
||||||
# (note NaNs compare as > thus the reversed condition!)
|
# (note NaNs compare as > thus the reversed condition!)
|
||||||
if gt ^ (asc != 1):
|
if gt ^ (asc != 1):
|
||||||
|
@ -1381,7 +1381,7 @@ def llListSort(lst, stride, asc):
|
||||||
a = v2f(a)
|
a = v2f(a)
|
||||||
a = a[0]*a[0] + a[1]*a[1] + a[2]*a[2]
|
a = a[0]*a[0] + a[1]*a[1] + a[2]*a[2]
|
||||||
if broken and ta in (unicode, Key):
|
if broken and ta in (unicode, Key):
|
||||||
a = a.encode('utf-32-be')
|
a = a.encode('utf-32-be') # pragma: no cover
|
||||||
return lst
|
return lst
|
||||||
|
|
||||||
def llListStatistics(op, lst):
|
def llListStatistics(op, lst):
|
||||||
|
|
|
@ -1479,7 +1479,7 @@ def do_tests():
|
||||||
|
|
||||||
|
|
||||||
# JSON tests - Here be dragons.
|
# JSON tests - Here be dragons.
|
||||||
print("9 errors expected past here -------------------------------------------------")
|
print "9 errors expected past here " + "-" * 50
|
||||||
test('''llEscapeURL(llList2Json(JSON_OBJECT, [llUnescapeURL(
|
test('''llEscapeURL(llList2Json(JSON_OBJECT, [llUnescapeURL(
|
||||||
u"%01%02%03%04%05%06%07%08%09%0A%0B%0C%0D%0E%0F"
|
u"%01%02%03%04%05%06%07%08%09%0A%0B%0C%0D%0E%0F"
|
||||||
u"%10%11%12%13%14%15%16%17%18%19%1A%1B%1C%1D%1E%1F"
|
u"%10%11%12%13%14%15%16%17%18%19%1A%1B%1C%1D%1E%1F"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue