Closed kloczek closed 2 years ago
Duplicate of #757 β before the root cause is fixed, set TZ=UTC
when running tests.
In pytest.ini is possible to force set any env variables. What about make new release (2.9.2?) π
Thank you
Fixed by #701.
Thank you π Just tested that PR and looks like it fixes most odf the issues however one unis still is failing
================================================================================= FAILURES =================================================================================
_________________________________________________________________________ test_extract_error_code __________________________________________________________________________
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fa5dee0a220>, capsys = <_pytest.capture.CaptureFixture object at 0x7fa5dee33c10>
def test_extract_error_code(monkeypatch, capsys):
monkeypatch.chdir(project_dir)
cmdinst = configure_cli_command("compile --domain=messages --directory i18n --locale fi_BUGGY")
assert cmdinst.run() == 1
out, err = capsys.readouterr()
# replace hack below for py2/py3 compatibility
> assert "unknown named placeholder 'merkki'" in err.replace("u'", "'")
E assert "unknown named placeholder 'merkki'" in ''
E + where '' = <built-in method replace of str object at 0x7fa5eac202f0>("u'", "'")
E + where <built-in method replace of str object at 0x7fa5eac202f0> = ''.replace
/home/tkloczko/rpmbuild/BUILD/babel-2.9.1/tests/messages/test_frontend.py:1394: AssertionError
============================================================================= warnings summary =============================================================================
babel/numbers.py::babel.numbers.format_number
babel/numbers.py::babel.numbers.format_number
babel/support.py::babel.support.Format.number
tests/test_numbers.py::test_format_number
tests/test_numbers.py::test_format_number
tests/test_support.py::test_format_number
/home/tkloczko/rpmbuild/BUILD/babel-2.9.1/babel/numbers.py:352: DeprecationWarning: Use babel.numbers.format_decimal() instead.
warnings.warn('Use babel.numbers.format_decimal() instead.', DeprecationWarning)
-- Docs: https://docs.pytest.org/en/stable/warnings.html
========================================================================= short test summary info ==========================================================================
SKIPPED [14] tests/test_dates.py:39: zoneinfo not available
SKIPPED [1] tests/test_localedata.py:164: windows-only test
SKIPPED [1] tests/test_support.py:167: lgettext is deprecated
SKIPPED [1] tests/test_support.py:136: lgettext is deprecated
SKIPPED [1] tests/test_support.py:111: lgettext is deprecated
SKIPPED [1] tests/test_support.py:81: lgettext is deprecated
FAILED tests/messages/test_frontend.py::test_extract_error_code - assert "unknown named placeholder 'merkki'" in ''
========================================================= 1 failed, 3116 passed, 19 skipped, 6 warnings in 11.96s ==========================================================
And pytest shows onewarning
============================================================================= warnings summary =============================================================================
babel/numbers.py::babel.numbers.format_number
babel/numbers.py::babel.numbers.format_number
babel/support.py::babel.support.Format.number
tests/test_numbers.py::test_format_number
tests/test_numbers.py::test_format_number
tests/test_support.py::test_format_number
/home/tkloczko/rpmbuild/BUILD/babel-2.9.1/babel/numbers.py:352: DeprecationWarning: Use babel.numbers.format_decimal() instead.
warnings.warn('Use babel.numbers.format_decimal() instead.', DeprecationWarning)
-- Docs: https://docs.pytest.org/en/stable/warnings.html
Hi @kloczek β the warnings should be gone with the current master
(4f8c7f67e4aa90790fbc36ce74220d22e2b00be7). Tests also seem to pass in CI, so I'm not quite sure why they'd fail for you.
Cannot apply cleanly that commit on top of last release. Will retest that when will be available new release. Thank you.π
I'm trying to package your module as an rpm package. So I'm using the typical build, install and test cycle used on building packages from non-root account.
May I ask for help because few units are failing: