Closed kloczek closed 2 years ago
This should be fixed in #72. @kloczek Could you check?
Sure :) Will back shortly with redults.
Just checked that and looks like it works. I've added few other commits to my build procedure. I think that it would be good to make new release :)
2.3.0 released! Thanks everyone.
Just tested 2.3.0. Small correction for some warning on rendering documentation:
+ /usr/bin/python3 setup.py build_sphinx -b man --build-dir build/sphinx
/usr/lib/python3.8/site-packages/pkg_resources/__init__.py:116: PkgResourcesDeprecationWarning: 1.16.0-unknown is an invalid version and will not be supported in a future release
warnings.warn(
/usr/lib/python3.8/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
warnings.warn(
WARNING: The wheel package is not available.
running build_sphinx
Running Sphinx v4.3.2
making output directory... done
building [mo]: targets for 0 po files that are out of date
building [man]: all manpages
updating environment: [new config] 5 added, 0 changed, 0 removed
reading sources... [100%] overview
WARNING: autodoc: failed to import method 'data_regression.DataRegressionFixture.check' from module 'pytest_regressions'; the following exception was raised:
No module named 'pytest_regressions'
WARNING: autodoc: failed to import method 'dataframe_regression.DataFrameRegressionFixture.check' from module 'pytest_regressions'; the following exception was raised:
No module named 'pytest_regressions'
WARNING: autodoc: failed to import method 'file_regression.FileRegressionFixture.check' from module 'pytest_regressions'; the following exception was raised:
No module named 'pytest_regressions'
WARNING: autodoc: failed to import method 'num_regression.NumericRegressionFixture.check' from module 'pytest_regressions'; the following exception was raised:
No module named 'pytest_regressions'
WARNING: autodoc: failed to import method 'image_regression.ImageRegressionFixture.check' from module 'pytest_regressions'; the following exception was raised:
No module named 'pytest_regressions'
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
writing... python-pytest-regressions.3 { installation overview api license } done
build succeeded, 5 warnings.
And fix:
--- a/doc/conf.py~ 2022-01-04 12:08:13.000000000 +0000
+++ b/doc/conf.py 2022-01-04 12:40:46.506675951 +0000
@@ -10,9 +10,9 @@
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
-# import os
-# import sys
-# sys.path.insert(0, os.path.abspath('.'))
+import os
+import sys
+sys.path.append(os.path.abspath('../src'))
# -- Project information -----------------------------------------------------
project = "pytest-regressions"
With that patch:
+ /usr/bin/python3 setup.py build_sphinx -b man --build-dir build/sphinx
/usr/lib/python3.8/site-packages/pkg_resources/__init__.py:116: PkgResourcesDeprecationWarning: 1.16.0-unknown is an invalid version and will not be supported in a future release
warnings.warn(
/usr/lib/python3.8/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
warnings.warn(
WARNING: The wheel package is not available.
running build_sphinx
Running Sphinx v4.3.2
making output directory... done
building [mo]: targets for 0 po files that are out of date
building [man]: all manpages
updating environment: [new config] 5 added, 0 changed, 0 removed
reading sources... [100%] overview
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
writing... python-pytest-regressions.3 { installation overview api license } done
build succeeded.
I'm not sure how to correct other warnings.
Please ignore that unit which is failing because missing
matplotlib
Just normal build, install and test cycle used on building package from non-root account:tests/test_grids.py .. [ 4%] tests/test_image_regression.py F. [ 9%] tests/test_num_regression.py ................ [ 45%] tests/test_file_regression.py .... [ 54%] . F [ 56%] tests/test_data_regression.py ....... [ 72%] tests/test_dataframe_regression.py ......F...FF [100%]
================================================================================= FAILURES ================================================================================= __ test_image_regression ___
image_regression = <pytest_regressions.image_regression.ImageRegressionFixture object at 0x7f78e2fd5880> datadir = PosixPath('/tmp/pytest-of-tkloczko/pytest-204/test_image_regression0/test_image_regression')
tests/test_image_regression.py:9: ModuleNotFoundError test session
cls = <class '_pytest.runner.CallInfo'>, func = <function call_runtest_hook.. at 0x7f78e28fd940>, when = 'call'
reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>)
/usr/lib/python3.8/site-packages/_pytest/runner.py:311:
/usr/lib/python3.8/site-packages/_pytest/runner.py:255:
self = <_HookCaller 'pytest_runtest_call'>, args = (), kwargs = {'item':}, notincall = set()
/usr/lib/python3.8/site-packages/pluggy/hooks.py:286:
self = <_pytest.config.PytestPluginManager object at 0x7f78eab62f70>, hook = <_HookCaller 'pytest_runtest_call'> methods = [<HookImpl plugin_name='runner', plugin=<module '_pytest.runner' from '/usr/lib/python3.8/site-packages/_pytest/runner...pper name='/dev/null' mode='r' encoding='UTF-8'>> _state='suspended' _in_suspended=False> _capture_fixture=None>>, ...] kwargs = {'item':}
/usr/lib/python3.8/site-packages/pluggy/manager.py:93:
hook = <_HookCaller 'pytest_runtest_call'> methods = [<HookImpl plugin_name='runner', plugin=<module '_pytest.runner' from '/usr/lib/python3.8/site-packages/_pytest/runner...pper name='/dev/null' mode='r' encoding='UTF-8'>> _state='suspended' _in_suspended=False> _capture_fixture=None>>, ...] kwargs = {'item':}
/usr/lib/python3.8/site-packages/pluggy/manager.py:84:
hook_impls = [<HookImpl plugin_name='runner', plugin=<module '_pytest.runner' from '/usr/lib/python3.8/site-packages/_pytest/runner...pper name='/dev/null' mode='r' encoding='UTF-8'>> _state='suspended' _in_suspended=False> _capture_fixture=None>>, ...] caller_kwargs = {'item':}, firstresult = False
/usr/lib/python3.8/site-packages/pluggy/callers.py:208:
self = <pluggy.callers._Result object at 0x7f78e263f730>
/usr/lib/python3.8/site-packages/pluggy/callers.py:80:
hook_impls = [<HookImpl plugin_name='runner', plugin=<module '_pytest.runner' from '/usr/lib/python3.8/site-packages/_pytest/runner...pper name='/dev/null' mode='r' encoding='UTF-8'>> _state='suspended' _in_suspended=False> _capture_fixture=None>>, ...] caller_kwargs = {'item':}, firstresult = False
/usr/lib/python3.8/site-packages/pluggy/callers.py:187:
item =
/usr/lib/python3.8/site-packages/_pytest/runner.py:170:
item =
/usr/lib/python3.8/site-packages/_pytest/runner.py:162:
self =
/usr/lib/python3.8/site-packages/pytest_checkdocs/init.py:29:
self =
/usr/lib/python3.8/site-packages/pytest_checkdocs/init.py:60:
root = '.'
/usr/lib/python3.8/site-packages/pep517/meta.py:71:
builder = functools.partial(<function build at 0x7f78e7a0adc0>, source_dir='.', system={'build-backend': 'setuptools.build_meta:legacy', 'requires': ['setuptools', 'wheel']})
/usr/lib/python3.8/site-packages/pep517/meta.py:58:
source_dir = '.', dest = '/tmp/tmppqylg39m', system = {'build-backend': 'setuptools.build_meta:legacy', 'requires': ['setuptools', 'wheel']}
/usr/lib/python3.8/site-packages/pep517/meta.py:53:
hooks = <pep517.wrappers.Pep517HookCaller object at 0x7f78e263f7f0>, env = <pep517.envbuild.BuildEnvironment object at 0x7f78e263f610>, dest = '/tmp/tmppqylg39m'
/usr/lib/python3.8/site-packages/pep517/meta.py:36:
self = <pep517.wrappers.Pep517HookCaller object at 0x7f78e263f7f0>, metadata_directory = '/tmp/tmpruv20d3u', config_settings = {}, _allow_fallback = True
/usr/lib/python3.8/site-packages/pep517/wrappers.py:184:
self = <pep517.wrappers.Pep517HookCaller object at 0x7f78e263f7f0>, hook_name = 'prepare_metadata_for_build_wheel' kwargs = {'_allow_fallback': True, 'config_settings': {}, 'metadata_directory': '/tmp/tmpruv20d3u'}
/usr/lib/python3.8/site-packages/pep517/wrappers.py:265:
cmd = ['/usr/bin/python3', '/usr/lib/python3.8/site-packages/pep517/in_process/_in_process.py', 'prepare_metadata_for_build_wheel', '/tmp/tmps1lr660y'] cwd = '/home/tkloczko/rpmbuild/BUILD/pytest-regressions-2.2.0', extra_environ = {'PEP517_BUILD_BACKEND': 'setuptools.build_meta:legacy'}
/usr/lib/python3.8/site-packages/pep517/wrappers.py:75:
timeout = None popenargs = (['/usr/bin/python3', '/usr/lib/python3.8/site-packages/pep517/in_process/_in_process.py', 'prepare_metadata_for_build_wheel', '/tmp/tmps1lr660y'],) kwargs = {'cwd': '/home/tkloczko/rpmbuild/BUILD/pytest-regressions-2.2.0', 'env': {'AR': '/usr/bin/gcc-ar', 'BASH_FUNC_which%%'...sh-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none', ...}, 'stderr': -2}
/usr/lib64/python3.8/subprocess.py:415:
input = None, capture_output = False, timeout = None, check = True popenargs = (['/usr/bin/python3', '/usr/lib/python3.8/site-packages/pep517/in_process/_in_process.py', 'prepare_metadata_for_build_wheel', '/tmp/tmps1lr660y'],) kwargs = {'cwd': '/home/tkloczko/rpmbuild/BUILD/pytest-regressions-2.2.0', 'env': {'AR': '/usr/bin/gcc-ar', 'BASH_FUNC_which%%'...-fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none', ...}, 'stderr': -2, 'stdout': -1} process = <subprocess.Popen object at 0x7f78e2554c10> stdout = b'Traceback (most recent call last):\n File "/usr/lib/python3.8/site-packages/pep517/in_process/_in_process.py", line...ng pip, instead of https://github.com/user/proj/archive/master.zip use git+https://github.com/user/proj.git#egg=proj\n' stderr = None, retcode = 1
/usr/lib64/python3.8/subprocess.py:516: CalledProcessError __ test_non_numeric_data[array1] ___
dataframe_regression = <pytest_regressions.dataframe_regression.DataFrameRegressionFixture object at 0x7f78c97d2ee0> array = [<test_dataframe_regression.Foo object at 0x7f78e354b520>, <test_dataframe_regression.Foo object at 0x7f78e3547100>, <test_dataframe_regression.Foo object at 0x7f78e35474f0>, <test_dataframe_regression.Foo object at 0x7f78e3547880>] no_regen = None
tests/test_dataframe_regression.py:184:
self = <pytest_regressions.dataframe_regression.DataFrameRegressionFixture object at 0x7f78c97d2ee0> data_frame = data1 0 <test_dataframe_regression.Foo object at 0x7f7... 1 <test_dat...t at 0x7f7... 2 <test_dataframe_regression.Foo object at 0x7f7... 3 <test_dataframe_regression.Foo object at 0x7f7... basename = None, fullpath = None, tolerances = None, default_tolerance = None
../../BUILDROOT/python-pytest-regressions-2.2.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/pytest_regressions/dataframe_regression.py:235: AssertionError
During handling of the above exception, another exception occurred:
dataframe_regression = <pytest_regressions.dataframe_regression.DataFrameRegressionFixture object at 0x7f78c97d2ee0> array = [<test_dataframe_regression.Foo object at 0x7f78e354b520>, <test_dataframe_regression.Foo object at 0x7f78e3547100>, <test_dataframe_regression.Foo object at 0x7f78e35474f0>, <test_dataframe_regression.Foo object at 0x7f78e3547880>] no_regen = None
tests/test_dataframe_regression.py:184: AssertionError __ test_non_numeric_data[array0] ___
dataframe_regression = <pytest_regressions.dataframe_regression.DataFrameRegressionFixture object at 0x7f78c971b850> array = [array([20, 18, 37, 32, 74, 91]), array([20, 18, 37, 32, 74, 91]), array([20, 18, 37, 32, 74, 91]), array([20, 18, 37, 32, 74, 91]), array([20, 18, 37, 32, 74, 91]), array([20, 18, 37, 32, 74, 91])] no_regen = None
tests/test_dataframe_regression.py:184:
self = <pytest_regressions.dataframe_regression.DataFrameRegressionFixture object at 0x7f78c971b850> data_frame = data1 0 [20, 18, 37, 32, 74, 91] 1 [20, 18, 37, 32, 74, 91] 2 [20, 18, 37, 32, 74, 91] 3 [20, 18, 37, 32, 74, 91] 4 [20, 18, 37, 32, 74, 91] 5 [20, 18, 37, 32, 74, 91] basename = None, fullpath = None, tolerances = None, default_tolerance = None
../../BUILDROOT/python-pytest-regressions-2.2.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/pytest_regressions/dataframe_regression.py:235: AssertionError
During handling of the above exception, another exception occurred:
dataframe_regression = <pytest_regressions.dataframe_regression.DataFrameRegressionFixture object at 0x7f78c971b850> array = [array([20, 18, 37, 32, 74, 91]), array([20, 18, 37, 32, 74, 91]), array([20, 18, 37, 32, 74, 91]), array([20, 18, 37, 32, 74, 91]), array([20, 18, 37, 32, 74, 91]), array([20, 18, 37, 32, 74, 91])] no_regen = None
tests/test_dataframe_regression.py:184: AssertionError ____ test_non_pandasdataframe ____
dataframe_regression = <pytest_regressions.dataframe_regression.DataFrameRegressionFixture object at 0x7f78c970f880>
tests/test_dataframe_regression.py:249:
self = <pytest_regressions.dataframe_regression.DataFrameRegressionFixture object at 0x7f78c970f880> data_frame = array([[1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], [1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], [1., 1., 1., ...1., 1., 1., 1., 1.], [1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], [1., 1., 1., 1., 1., 1., 1., 1., 1., 1.]]) basename = None, fullpath = None, tolerances = None, default_tolerance = None
../../BUILDROOT/python-pytest-regressions-2.2.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/pytest_regressions/dataframe_regression.py:224: AssertionError
During handling of the above exception, another exception occurred:
dataframe_regression = <pytest_regressions.dataframe_regression.DataFrameRegressionFixture object at 0x7f78c970f880>
tests/test_dataframe_regression.py:249: AssertionError ========================================================================= short test summary info ========================================================================== FAILED tests/test_image_regression.py::test_image_regression - ModuleNotFoundError: No module named 'matplotlib' FAILED ::project - subprocess.CalledProcessError: Command '['/usr/bin/python3', '/usr/lib/python3.8/site-packages/pep517/in_process/_in_process.py', 'prepare_metadata_fo... FAILED tests/test_dataframe_regression.py::test_non_numeric_data[array1] - AssertionError: Regex pattern "Only numeric data is supported on dataframe_regression fixture.... FAILED tests/test_dataframe_regression.py::test_non_numeric_data[array0] - AssertionError: Regex pattern "Only numeric data is supported on dataframe_regression fixture.... FAILED tests/test_dataframe_regression.py::test_non_pandas_dataframe - AssertionError: Regex pattern "Only pandas DataFrames are supported on on dataframe_regression fix... ====================================================================== 5 failed, 39 passed in 18.00s =======================================================================