Skip to content

Commit

Permalink
Fix test error and add yuzp1996 to default_data.json
Browse files Browse the repository at this point in the history
Add yuzp1996 to default_data.json.

Fix bug that test can not pass because of six is no longer
support in Python3 so I delete the moudle six and delete
the related logic.

Signed-off-by: yuzhipeng <[email protected]>
  • Loading branch information
yuzp1996 committed May 28, 2022
1 parent b2a7186 commit 454d9ed
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
11 changes: 11 additions & 0 deletions default_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -36522,6 +36522,17 @@
"user_name": "Wenzhi Yu",
"emails": ["[email protected]", "[email protected]"]
},
{
"github_id": "yuzp1996",
"companies": [
{
"company_name": "Alauda",
"end_date": null
}
],
"user_name": "yuzhipeng",
"emails": ["[email protected]", "[email protected]", "[email protected]"]
},
{
"github_id": "yxpoke",
"companies": [
Expand Down
7 changes: 1 addition & 6 deletions tests/test_config_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import functools
import json

import jsonschema
import six
import testtools

DEFAULT_DATA_JSON_PATH = 'default_data.json'
Expand Down Expand Up @@ -50,10 +48,7 @@ def dict_raise_on_duplicates(ordered_pairs):
class TestConfigFiles(testtools.TestCase):

def _read_raw_file(self, file_name):
if six.PY3:
opener = functools.partial(open, encoding='utf8')
else:
opener = open
opener = open
with opener(file_name, 'r') as content_file:
return content_file.read()

Expand Down

0 comments on commit 454d9ed

Please sign in to comment.