Skip to content

[Python3 migration]Fix test failure in test_nhop_group.py#8076

Merged
wsycqyz merged 1 commit intosonic-net:masterfrom
wsycqyz:shiyanwang-py2to3-ipfwd
Apr 19, 2023
Merged

[Python3 migration]Fix test failure in test_nhop_group.py#8076
wsycqyz merged 1 commit intosonic-net:masterfrom
wsycqyz:shiyanwang-py2to3-ipfwd

Conversation

@wsycqyz
Copy link
Copy Markdown
Contributor

@wsycqyz wsycqyz commented Apr 19, 2023

Description of PR

Summary:
Fixes test failure after Python3 migration in test_nhop_group.py

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 failed with following error:
File "/azp/_work/15/s/tests/ipfwd/test_nhop_group.py", line 117, in init
moff1 = "{0:x}".format(i / 255)
ValueError: Unknown format code 'x' for object of type 'float'

How did you do it?

Use "//" instead of "/"
Search the whole code base and only find this one.

How did you verify/test it?

Manually run the testcase.

Any platform specific information?

N/A

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

N/A

Documentation

@wsycqyz wsycqyz requested a review from jcaiMR April 19, 2023 01:56
@wsycqyz wsycqyz merged commit ed84de2 into sonic-net:master Apr 19, 2023
@wsycqyz wsycqyz deleted the shiyanwang-py2to3-ipfwd 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.

2 participants