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

Improvements to tests to enable pytest #164

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

moto-timo
Copy link

In the Yocto Project/OpenEmbedded we typically run our python tests with pytest --automake. This pull request makes the import of tests.utils more explicit so that pytest finds the modules. Also convert line endings of test_functionality.py from DOS/Windows to Unix like the other files in tests/.

Convert the Windows line endings with dos2unix to be like the
other files in tests/*

Signed-off-by: Tim Orling <[email protected]>
Running the test cases with pytest leads to importlib errors
because the "utils" module cannot be found.

Upstream-Status: Submitted []

Signed-off-by: Tim Orling <[email protected]>
@moto-timo
Copy link
Author

kraj pushed a commit to YoeDistro/meta-openembedded that referenced this pull request Dec 27, 2023
* Switch to the python_setuptools_build_meta PEP-517 backend
* Refactor and submit 0001-Fix-imports-for-ptests.patch
  - split out the Windows -> Unix line endings conversion
  - sumerc/yappi#164
* Drop 0002-add-3.11-to-the-setup.patch; upstream added 3.11 and 3.12
* Drop install of yappi.py in ptest; use site-packages as intended
* Drop complex run-ptest and simply run 'pytest --automake'
* Move out of "problems" group to "slow" group in ptest-packageslists-meta-python.inc
  - can now build meta-python-image-ptest-python3-yappi
  - tests take about 45 seconds

https://github.com/sumerc/yappi/blob/1.6.0/CHANGELOG

1.6.0 (2023-12-07)

- Drop support 2.7-3.5 and clean backward compatible code (pull/152)
- Add Python 3.12 wheels

1.5.1 (2023-12-06)

- Add support for Python 3.12
- Fix child callgrind functions disappear

Signed-off-by: Tim Orling <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
kraj pushed a commit to YoeDistro/meta-openembedded that referenced this pull request Dec 29, 2023
* Switch to the python_setuptools_build_meta PEP-517 backend
* Refactor and submit 0001-Fix-imports-for-ptests.patch
  - split out the Windows -> Unix line endings conversion
  - sumerc/yappi#164
* Drop 0002-add-3.11-to-the-setup.patch; upstream added 3.11 and 3.12
* Drop install of yappi.py in ptest; use site-packages as intended
* Drop complex run-ptest and simply run 'pytest --automake'
* Move out of "problems" group to "slow" group in ptest-packageslists-meta-python.inc
  - can now build meta-python-image-ptest-python3-yappi
  - tests take about 45 seconds

https://github.com/sumerc/yappi/blob/1.6.0/CHANGELOG

1.6.0 (2023-12-07)

- Drop support 2.7-3.5 and clean backward compatible code (pull/152)
- Add Python 3.12 wheels

1.5.1 (2023-12-06)

- Add support for Python 3.12
- Fix child callgrind functions disappear

Signed-off-by: Tim Orling <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
@sumerc
Copy link
Owner

sumerc commented Jan 2, 2024

Thanks!

sgunin pushed a commit to sgunin/oe-meta-openembedded-contrib that referenced this pull request Mar 17, 2024
* Switch to the python_setuptools_build_meta PEP-517 backend
* Refactor and submit 0001-Fix-imports-for-ptests.patch
  - split out the Windows -> Unix line endings conversion
  - sumerc/yappi#164
* Drop 0002-add-3.11-to-the-setup.patch; upstream added 3.11 and 3.12
* Drop install of yappi.py in ptest; use site-packages as intended
* Drop complex run-ptest and simply run 'pytest --automake'
* Move out of "problems" group to "slow" group in ptest-packageslists-meta-python.inc
  - can now build meta-python-image-ptest-python3-yappi
  - tests take about 45 seconds

https://github.com/sumerc/yappi/blob/1.6.0/CHANGELOG

1.6.0 (2023-12-07)

- Drop support 2.7-3.5 and clean backward compatible code (pull/152)
- Add Python 3.12 wheels

1.5.1 (2023-12-06)

- Add support for Python 3.12
- Fix child callgrind functions disappear

Signed-off-by: Tim Orling <[email protected]>
daregit pushed a commit to daregit/yocto-combined that referenced this pull request May 22, 2024
* Switch to the python_setuptools_build_meta PEP-517 backend
* Refactor and submit 0001-Fix-imports-for-ptests.patch
  - split out the Windows -> Unix line endings conversion
  - sumerc/yappi#164
* Drop 0002-add-3.11-to-the-setup.patch; upstream added 3.11 and 3.12
* Drop install of yappi.py in ptest; use site-packages as intended
* Drop complex run-ptest and simply run 'pytest --automake'
* Move out of "problems" group to "slow" group in ptest-packageslists-meta-python.inc
  - can now build meta-python-image-ptest-python3-yappi
  - tests take about 45 seconds

https://github.com/sumerc/yappi/blob/1.6.0/CHANGELOG

1.6.0 (2023-12-07)

- Drop support 2.7-3.5 and clean backward compatible code (pull/152)
- Add Python 3.12 wheels

1.5.1 (2023-12-06)

- Add support for Python 3.12
- Fix child callgrind functions disappear

Signed-off-by: Tim Orling <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
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.

None yet

2 participants