fix: [python] fix version typo issues

上级 ffdcfa60
......@@ -14,7 +14,7 @@ var (
)
func (p *PythonBaseParser) CheckVersion(ver int) bool {
return ver == Autodetect || ver == Version
return Version == Autodetect || ver == Version
}
func (p *PythonBaseParser) SetVersion(ver int) {
......
......@@ -40,6 +40,17 @@ func Test_PythonClass(t *testing.T) {
g.Expect(1).To(Equal(1))
}
func Test_PythonVersion(t *testing.T) {
g := NewGomegaWithT(t)
app := new(PythonApiApp)
app.Analysis("print 'a' ", "")
app.Analysis("print('a')", "")
g.Expect(1).To(Equal(1))
}
func Test_PythonFuncDefStm(t *testing.T) {
g := NewGomegaWithT(t)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册