%global _empty_manifest_terminate_build 0 Name: python-pytest-odoo Version: 0.9.1 Release: 1 Summary: py.test plugin to run Odoo tests License: AGPLv3 URL: https://github.com/camptocamp/pytest-odoo Source0: https://mirrors.nju.edu.cn/pypi/web/packages/90/5a/5cba6755a3a33345275d6b31dd24e61b4ef335f8cd9988722a3c5ca543f6/pytest-odoo-0.9.1.tar.gz BuildArch: noarch Requires: python3-pytest %description pytest plugin to run Odoo tests This lib allows to run the tests built in Odoo addons which are using Python's `unittest `_, but with the comfort of the `pytest `_ CLI. Also allowing to run tests without updating given module. Odoo's `--test-enable` machinery and pytest-odoo do not cover exactly the same scope. The Odoo's test runner runs the tests during the upgrades of the addons, that's why they need the "at install" and "post install" markers. Running tests during upgrades of addons is waaay too slow to work efficiently in a TDD mode, that's where pytest-odoo shines. Consider that all the tests are running `post-install` with pytest-odoo, as you must run the upgrade of the addon before (but only when needed vs each run). At the end of the day, its beneficial to run the Odoo tests with `--test-enable` because, as in very rare conditions, a test can pass with pytest-odoo but not with the "at install" tests run during the upgrade (or the oposite). Pytest-odoo can be considered a development tool, but not the tool that should replace entirely `--test-enable` in a CI. See also the `official Odoo documentation `_ on writing tests. %package -n python3-pytest-odoo Summary: py.test plugin to run Odoo tests Provides: python-pytest-odoo BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-pytest-odoo pytest plugin to run Odoo tests This lib allows to run the tests built in Odoo addons which are using Python's `unittest `_, but with the comfort of the `pytest `_ CLI. Also allowing to run tests without updating given module. Odoo's `--test-enable` machinery and pytest-odoo do not cover exactly the same scope. The Odoo's test runner runs the tests during the upgrades of the addons, that's why they need the "at install" and "post install" markers. Running tests during upgrades of addons is waaay too slow to work efficiently in a TDD mode, that's where pytest-odoo shines. Consider that all the tests are running `post-install` with pytest-odoo, as you must run the upgrade of the addon before (but only when needed vs each run). At the end of the day, its beneficial to run the Odoo tests with `--test-enable` because, as in very rare conditions, a test can pass with pytest-odoo but not with the "at install" tests run during the upgrade (or the oposite). Pytest-odoo can be considered a development tool, but not the tool that should replace entirely `--test-enable` in a CI. See also the `official Odoo documentation `_ on writing tests. %package help Summary: Development documents and examples for pytest-odoo Provides: python3-pytest-odoo-doc %description help pytest plugin to run Odoo tests This lib allows to run the tests built in Odoo addons which are using Python's `unittest `_, but with the comfort of the `pytest `_ CLI. Also allowing to run tests without updating given module. Odoo's `--test-enable` machinery and pytest-odoo do not cover exactly the same scope. The Odoo's test runner runs the tests during the upgrades of the addons, that's why they need the "at install" and "post install" markers. Running tests during upgrades of addons is waaay too slow to work efficiently in a TDD mode, that's where pytest-odoo shines. Consider that all the tests are running `post-install` with pytest-odoo, as you must run the upgrade of the addon before (but only when needed vs each run). At the end of the day, its beneficial to run the Odoo tests with `--test-enable` because, as in very rare conditions, a test can pass with pytest-odoo but not with the "at install" tests run during the upgrade (or the oposite). Pytest-odoo can be considered a development tool, but not the tool that should replace entirely `--test-enable` in a CI. See also the `official Odoo documentation `_ on writing tests. %prep %autosetup -n pytest-odoo-0.9.1 %build %py3_build %install %py3_install install -d -m755 %{buildroot}/%{_pkgdocdir} if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi pushd %{buildroot} if [ -d usr/lib ]; then find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/lib64 ]; then find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/bin ]; then find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/sbin ]; then find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst fi touch doclist.lst if [ -d usr/share/man ]; then find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst fi popd mv %{buildroot}/filelist.lst . mv %{buildroot}/doclist.lst . %files -n python3-pytest-odoo -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Tue May 30 2023 Python_Bot - 0.9.1-1 - Package Spec generated