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

[xcvrd] Fix unit test issue with Python 3 #135

Merged
merged 1 commit into from
Dec 18, 2020

Conversation

Junchao-Mellanox
Copy link
Collaborator

Why I did this?

xcvrd unit test failed when building it with python3:

17:23:50  _____________________ ERROR collecting tests/test_xcvrd.py _____________________
17:23:50  tests/test_xcvrd.py:36: in <module>
17:23:50      class TestXcvrdScript(object):
17:23:50  tests/test_xcvrd.py:41: in TestXcvrdScript
17:23:50      @patch('xcvrd.xcvrd.logical_port_name_to_physical_port_list', MagicMock(return_value=[0]))
17:23:50  E   NameError: name 'patch' is not defined

How I did this?
import the package patch

How I test this?

Run build

@jleveque jleveque changed the title [xcvrd] Fix unit test issue for xcvrd [xcvrd] Fix unit test issue with Python 3 Dec 18, 2020
@jleveque jleveque merged commit e6c786b into sonic-net:master Dec 18, 2020
@Junchao-Mellanox Junchao-Mellanox deleted the fix-xcvrd-ut branch December 18, 2020 07:39
sujinmkang pushed a commit to sujinmkang/sonic-platform-daemons that referenced this pull request Jan 16, 2021
Why I did this?

xcvrd unit test failed when building it with python3: 

```
17:23:50  _____________________ ERROR collecting tests/test_xcvrd.py _____________________
17:23:50  tests/test_xcvrd.py:36: in <module>
17:23:50      class TestXcvrdScript(object):
17:23:50  tests/test_xcvrd.py:41: in TestXcvrdScript
17:23:50      @patch('xcvrd.xcvrd.logical_port_name_to_physical_port_list', MagicMock(return_value=[0]))
17:23:50  E   NameError: name 'patch' is not defined
```

How I did this?
import the package patch
vdahiya12 added a commit to vdahiya12/sonic-platform-daemons that referenced this pull request Apr 4, 2022
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants