Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Python3 migration]Fix test failure in test_sub_port_l2_forwarding.py #8096

Merged

Conversation

wsycqyz
Copy link
Contributor

@wsycqyz wsycqyz commented Apr 20, 2023

Description of PR

Summary:
Fixes #7884 [test_sub_port_l2_forwarding] [test issue] TypeError: a bytes-like object is required, not 'str'

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Back port request

  • 201911
  • 202012
  • 202205

Approach

What is the motivation for this PR?

test sub_port_interfaces/test_sub_port_l2_forwarding.py fail over python3 issue:
TypeError: a bytes-like object is required, not 'str'

How did you do it?

In Python3, a string cannot work with bytes
Use str to convert bytes to string

How did you verify/test it?

The change can work both in Python2 and Python3.

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

@wsycqyz wsycqyz merged commit dd0b5f8 into sonic-net:master Apr 21, 2023
@wsycqyz wsycqyz deleted the shiyanwang-py2to3-sub-port-interfaces branch April 22, 2023 01:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[test_sub_port_l2_forwarding] [test issue] TypeError: a bytes-like object is required, not 'str'
2 participants