updated test data for python3.4

This commit is contained in:
Ekaterina Tuzova
2013-12-26 19:23:29 +04:00
parent 6ac4b445a0
commit de36aec875
14 changed files with 26 additions and 22 deletions
@@ -109,7 +109,10 @@ public enum LanguageLevel {
if (pythonVersion.startsWith("3.2")) {
return PYTHON32;
}
return PYTHON33;
if (pythonVersion.startsWith("3.3")) {
return PYTHON33;
}
return PYTHON34;
}
return PYTHON24;
}
@@ -51,6 +51,7 @@ public abstract class CompatibilityVisitor extends PyAnnotator {
AVAILABLE_PREFIXES.put(LanguageLevel.PYTHON31, Sets.newHashSet("R", "B", "BR"));
AVAILABLE_PREFIXES.put(LanguageLevel.PYTHON32, Sets.newHashSet("R", "B", "BR"));
AVAILABLE_PREFIXES.put(LanguageLevel.PYTHON33, Sets.newHashSet("R", "U", "B", "BR", "RB"));
AVAILABLE_PREFIXES.put(LanguageLevel.PYTHON34, Sets.newHashSet("R", "U", "B", "BR", "RB"));
}
public CompatibilityVisitor(List<LanguageLevel> versionsToProcess) {
@@ -1,4 +1,4 @@
print(<warning descr="Python version 3.0, 3.1, 3.2, 3.3 do not support <>, use != instead.">a <> b</warning>)
print(<warning descr="Python version 3.0, 3.1, 3.2, 3.3, 3.4 do not support <>, use != instead.">a <> b</warning>)
if <warning descr="Python version 3.0, 3.1, 3.2, 3.3 do not support <>, use != instead.">a <> 2</warning>:
if <warning descr="Python version 3.0, 3.1, 3.2, 3.3, 3.4 do not support <>, use != instead.">a <> 2</warning>:
var = a
@@ -2,11 +2,11 @@ class A(B):
def __init__(self):
<warning descr="Python version 2.4, 2.5, 2.6, 2.7 do not support this syntax. super() should have arguments in Python 2">super()</warning>
<warning descr="Python version 3.1, 3.2, 3.3 do not have method cmp">cmp()</warning>
<warning descr="Python version 3.0, 3.1, 3.2, 3.3 do not have method reduce">reduce()</warning>
<warning descr="Python version 3.1, 3.2, 3.3, 3.4 do not have method cmp">cmp()</warning>
<warning descr="Python version 3.0, 3.1, 3.2, 3.3, 3.4 do not have method reduce">reduce()</warning>
<warning descr="Python version 2.4 does not have method all">all()</warning>
<warning descr="Python version 3.0, 3.1, 3.2, 3.3 do not have method buffer">buffer()</warning>
<warning descr="Python version 3.0, 3.1, 3.2, 3.3, 3.4 do not have method buffer">buffer()</warning>
def foo(a,b,c):
print (a,b,c)
@@ -5,5 +5,5 @@ try:
try:
do_smth()
<warning descr="Python version 3.0, 3.1, 3.2, 3.3 do not support this syntax.">except ImportError, ImportWarning:
<warning descr="Python version 3.0, 3.1, 3.2, 3.3, 3.4 do not support this syntax.">except ImportError, ImportWarning:
do()</warning>
@@ -1,7 +1,7 @@
<warning descr="Python version 2.4 doesn't support this syntax.">from . import smth</warning>
<warning descr="Python version 2.4 doesn't support this syntax.">from .module import name1, name2</warning>
from <warning descr="Python version 3.0, 3.1, 3.2, 3.3 do not have module Bastion">Bastion</warning> import BastionClass
from <warning descr="Python version 3.0, 3.1, 3.2, 3.3, 3.4 do not have module Bastion">Bastion</warning> import BastionClass
<warning descr="Python version 2.4 doesn't support this syntax.">from . import exceptions</warning>
@@ -1 +1 @@
import <warning descr="Python version 3.0, 3.1, 3.2, 3.3 do not have module Bastion">Bastion</warning>
import <warning descr="Python version 3.0, 3.1, 3.2, 3.3, 3.4 do not have module Bastion">Bastion</warning>
@@ -1,3 +1,3 @@
<error descr="Python version 2.7 does not have module builtins"><warning descr="Python version 2.4, 2.5, 2.6, 2.7 do not have module builtins">import builtins</warning></error>
<warning descr="Python version 3.0, 3.1, 3.2, 3.3 do not have module __builtin__">import __builtin__</warning>
<warning descr="Python version 3.0, 3.1, 3.2, 3.3, 3.4 do not have module __builtin__">import __builtin__</warning>
@@ -1 +1 @@
var = [x for x in <warning descr="Python version 3.0, 3.1, 3.2, 3.3 do not support this syntax in list comprehensions.">1, 2, 3</warning>]
var = [x for x in <warning descr="Python version 3.0, 3.1, 3.2, 3.3, 3.4 do not support this syntax in list comprehensions.">1, 2, 3</warning>]
@@ -1,2 +1,2 @@
a = <warning descr="Python version 3.0, 3.1, 3.2, 3.3 do not support a trailing 'l' or 'L'.">12l</warning>
v = <warning descr="Python version 3.0, 3.1, 3.2, 3.3 do not support this syntax. It requires '0o' prefix for octal literals">04</warning><error descr="End of statement expected">8</error>
a = <warning descr="Python version 3.0, 3.1, 3.2, 3.3, 3.4 do not support a trailing 'l' or 'L'.">12l</warning>
v = <warning descr="Python version 3.0, 3.1, 3.2, 3.3, 3.4 do not support this syntax. It requires '0o' prefix for octal literals">04</warning><error descr="End of statement expected">8</error>
@@ -1,6 +1,6 @@
try:
a
except :
<warning descr="Python version 3.0, 3.1, 3.2, 3.3 do not support this syntax.">raise ImportError, ImportWarning</warning>
<warning descr="Python version 3.0, 3.1, 3.2, 3.3, 3.4 do not support this syntax.">raise ImportError, ImportWarning</warning>
<warning descr="Python version 3.0, 3.1, 3.2, 3.3 do not support this syntax. Raise with no arguments can only be used in an except block">raise</warning>
<warning descr="Python version 3.0, 3.1, 3.2, 3.3, 3.4 do not support this syntax. Raise with no arguments can only be used in an except block">raise</warning>
@@ -1 +1 @@
a = <warning descr="Python version 3.0, 3.1, 3.2, 3.3 do not support backquotes, use repr() instead">`imp.acquire_lock()`</warning>
a = <warning descr="Python version 3.0, 3.1, 3.2, 3.3, 3.4 do not support backquotes, use repr() instead">`imp.acquire_lock()`</warning>
@@ -23,7 +23,7 @@ a = <warning descr="Python version 2.4, 2.5 do not support a 'B' prefix">b</warn
a = <warning descr="Python version 3.0, 3.1, 3.2 do not support a 'U' prefix">u</warning>""
a = r""
a = <warning descr="Python version 3.0, 3.1, 3.2, 3.3 do not support a 'UR' prefix">ur</warning>""
a = <warning descr="Python version 3.0, 3.1, 3.2, 3.3, 3.4 do not support a 'UR' prefix">ur</warning>""
a = <warning descr="Python version 2.4, 2.5 do not support a 'B' prefix">b</warning>""
a = <warning descr="Python version 2.4, 2.5, 3.0 do not support a 'BR' prefix">br</warning>""
@@ -31,12 +31,12 @@ a = <warning descr="Python version 2.4, 2.5, 3.0 do not support a 'BR' prefix">b
a = <warning descr="Python version 3.0, 3.1, 3.2 do not support a 'U' prefix">u</warning>""
a = r""
a = <warning descr="Python version 3.0, 3.1, 3.2, 3.3 do not support a 'UR' prefix">ur</warning>""
a = <warning descr="Python version 3.0, 3.1, 3.2, 3.3, 3.4 do not support a 'UR' prefix">ur</warning>""
# combined
b = <warning descr="Python version 3.0, 3.1, 3.2 do not support a 'U' prefix">u</warning>"" <warning descr="Python version 2.4, 2.5 do not support a 'B' prefix">b</warning>""
# never was available
a = <error descr="Python version 2.7 does not support a 'RR' prefix"><warning descr="Python version 2.4, 2.5, 2.6, 2.7, 3.0, 3.1, 3.2, 3.3 do not support a 'RR' prefix">rr</warning></error>""
a = <error descr="Python version 2.7 does not support a 'BB' prefix"><warning descr="Python version 2.4, 2.5, 2.6, 2.7, 3.0, 3.1, 3.2, 3.3 do not support a 'BB' prefix">bb</warning></error>""
a = <error descr="Python version 2.7 does not support a 'UU' prefix"><warning descr="Python version 2.4, 2.5, 2.6, 2.7, 3.0, 3.1, 3.2, 3.3 do not support a 'UU' prefix">uu</warning></error>""
a = <error descr="Python version 2.7 does not support a 'RR' prefix"><warning descr="Python version 2.4, 2.5, 2.6, 2.7, 3.0, 3.1, 3.2, 3.3, 3.4 do not support a 'RR' prefix">rr</warning></error>""
a = <error descr="Python version 2.7 does not support a 'BB' prefix"><warning descr="Python version 2.4, 2.5, 2.6, 2.7, 3.0, 3.1, 3.2, 3.3, 3.4 do not support a 'BB' prefix">bb</warning></error>""
a = <error descr="Python version 2.7 does not support a 'UU' prefix"><warning descr="Python version 2.4, 2.5, 2.6, 2.7, 3.0, 3.1, 3.2, 3.3, 3.4 do not support a 'UU' prefix">uu</warning></error>""
@@ -1 +1 @@
print(<warning descr="Python version 3.0, 3.1, 3.2, 3.3 do not support <>, use != instead.">a <> <caret>b</warning>)
print(<warning descr="Python version 3.0, 3.1, 3.2, 3.3, 3.4 do not support <>, use != instead.">a <> b</warning>)