Skip to content

[action] [PR:9232] Fix import issue of tests/snappi_tests in python3#9246

Merged
mssonicbld merged 1 commit intosonic-net:202305from
mssonicbld:cherry/202305/9232
Aug 3, 2023
Merged

[action] [PR:9232] Fix import issue of tests/snappi_tests in python3#9246
mssonicbld merged 1 commit intosonic-net:202305from
mssonicbld:cherry/202305/9232

Conversation

@mssonicbld
Copy link
Collaborator

Description of PR

Summary:
Fixes # (issue)

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?

To support smooth python3 migration, we need to explicitly specify the python version to be used in each branch. For master branch, default python should be python3. Need to use python3 to run the collect-only check as well.

Because of the gap in collect-only check of PR testing, some import issues under tests/snappi_tests are not caught.

How did you do it?

  • Use "python3 -m pytest" instead of directly run "pytest" command to do collect-only check.
  • Fixed all the import issues of tests/snappi_tests in python3.

How did you verify/test it?

Any platform specific information?

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

Documentation

What is the motivation for this PR?
To support smooth python3 migration, we need to explicitly specify the python version to be used in each branch. For master branch, default python should be python3. Need to use python3 to run the collect-only check as well.
Because of the gap in collect-only check of PR testing, some import issues under tests/snappi_tests are not caught.

How did you do it?
* Use "python3 -m pytest" instead of directly run "pytest" command to do collect-only check.
* Fixed all the import issues of tests/snappi_tests in python3.

Signed-off-by: Xin Wang <[email protected]>
@mssonicbld
Copy link
Collaborator Author

Original PR: #9232

@mssonicbld mssonicbld merged commit e52e65c into sonic-net:202305 Aug 3, 2023
@mssonicbld mssonicbld deleted the cherry/202305/9232 branch February 4, 2024 09:08
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