Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Commit

Permalink
enable 03
Browse files Browse the repository at this point in the history
  • Loading branch information
SigureMo committed Aug 29, 2023
1 parent f1eaa9b commit 545efe4
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
1 change: 0 additions & 1 deletion tests/run_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ failed_tests=()

py311_skiped_tests=(
# ./test_01_basic.py There are some case need to be fixed
# ./test_03_tuple.py There are some case need to be fixed
# ./test_04_list.py There are some case need to be fixed
# ./test_05_dict.py There are some case need to be fixed
./test_10_build_unpack.py
Expand Down
4 changes: 0 additions & 4 deletions tests/test_03_tuple.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

from __future__ import annotations

import sys
import unittest

from test_case_base import TestCaseBase
Expand Down Expand Up @@ -62,9 +61,6 @@ def test_build_tuple(self):
)


@unittest.skipIf(
sys.version_info >= (3, 11), "Python 3.11+ is not supported yet."
)
class TestTupleMethods(TestCaseBase):
def test_tuple_methods_int(self):
self.assert_results(tuple_count_int, 1, paddle.to_tensor(2))
Expand Down
9 changes: 6 additions & 3 deletions tests/test_04_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,15 +218,18 @@ def test_list_basic(self):
)


@unittest.skipIf(
sys.version_info >= (3, 11), "Python 3.11+ is not supported yet."
)
class TestListMethods(TestCaseBase):
@unittest.skipIf(
sys.version_info >= (3, 11), "Python 3.11+ not support breakgraph"
)
def test_list_setitem(self):
self.assert_results_with_side_effects(
list_setitem_tensor, 1, paddle.to_tensor(2)
)

@unittest.skipIf(
sys.version_info >= (3, 11), "Python 3.11+ not support breakgraph"
)
def test_list_count_and_index(self):
self.assert_results(list_count_int, 1, paddle.to_tensor(2))
self.assert_results(list_index_int, 1, paddle.to_tensor(2))
Expand Down
7 changes: 4 additions & 3 deletions tests/test_05_dict.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,6 @@ def test_build_const_key_map(self):
self.assert_results(build_const_key_map, 1, paddle.to_tensor(2))


@unittest.skipIf(
sys.version_info >= (3, 11), "Python 3.11+ is not supported yet."
)
class TestDictMethods(TestCaseBase):
def test_dict_get_item(self):
self.assert_results(dict_get_item, 1, paddle.to_tensor(2))
Expand Down Expand Up @@ -228,6 +225,10 @@ def test_dict_popitem(self):
dict_popitem, 1, paddle.to_tensor(2)
)

@unittest.skipIf(
sys.version_info >= (3, 11),
"dict_construct_from_comprehension Python 3.11+ has some issues",
)
def test_construct(self):
self.assert_results(dict_construct_from_dict)
self.assert_results(dict_construct_from_list)
Expand Down

0 comments on commit 545efe4

Please sign in to comment.