(_format_args(expectation.name, args), > _format_args(next_method.name, next_method.args))) E flexmock.CallOrderError: bar() called before bar("b") ../flexmock-0.10.2-python3_5/lib/flexmock.py:149: CallOrderError TestRegularClass.test_flexmock_ordered_works_with_same_args_after_default_stub ------------------------------------------------------------------- This is an unstable amd64 chroot image at a tinderbox (==build bot) name: 17.0-hardened_test_20180512-194415 ------------------------------------------------------------------- gcc-config -l: [1] x86_64-pc-linux-gnu-7.3.0 * Available Python interpreters, in order of preference: [1] python3.5 [2] python3.6 (fallback) [3] python2.7 (fallback) [4] pypy3 (fallback) [5] pypy (fallback) java-config: The following VMs are available for generation-2: emerge -qpv dev-python/flexmock [ebuild N ] dev-python/flexmock-0.10.2 USE="{test}" PYTHON_TARGETS="python3_5 -python3_4 -python3_6" !!! The following installed packages are masked: - sys-apps/baselayout-2.5::gentoo (masked by: package.mask) /usr/portage/profiles/package.mask: # William Hubbs <williamh@gentoo.org> (22 May 2018) # Installs spurious paths ,see bug #656380 For more information, see the MASKED PACKAGES section in the emerge man page or refer to the Gentoo Handbook.
Created attachment 532986 [details] emerge-info.txt
Created attachment 532988 [details] dev-python:flexmock-0.10.2:20180524-112409.log
Created attachment 532990 [details] emerge-history.txt
Created attachment 532992 [details] environment
Created attachment 532994 [details] etc.portage.tbz2
Created attachment 532996 [details] temp.tbz2
Created attachment 532998 [details] tests.tbz2
The issue seems to have appeared before and is caused by teardown methods not being executed: https://github.com/has207/flexmock/issues/98 The patch of the referring PR is still in place. Looking at the existing tests and logs that explanation matches, so it could be a change in how pytest handles teardowns or a new regression in pytest. I can't reproduce the issue with the same python and pytest versions though. Could you execute the tests again to see if its an intermittent or random error? Thanks.
run it again at that image but got now a different error - see attached files
Created attachment 535142 [details] emerge-info.txt
Created attachment 535144 [details] dev-python:flexmock-0.10.2:20180606-203753.log
Created attachment 535146 [details] emerge-history.txt
Created attachment 535148 [details] environment
Created attachment 535150 [details] etc.portage.tbz2
Created attachment 535152 [details] temp.tbz2
Created attachment 535154 [details] tests.tbz2
Thanks. That seems to be a problem with pytests' plugin system. I'll see if I can reproduce that in a clean jail.
(In reply to Nelo-T. Wallus (ntnn) from comment #17) would be great b/c this _pluggy happens often here at the tinderbox at various images
Seems to be a bug caused by dev-python/pytest-metadata: https://github.com/pytest-dev/pytest/issues/2960 The original repository has been deleted, so the RCA can't be followed. The project has been forked to https://github.com/davehunt/pytest-metadata/, which is used as upstream for the gentoo package. We're also lagging a few minors behind, though the fork hasn't seen any work in a few months. There are no packages depending on pytest-metadata. I'll post a PR to bump the package to the newest version - hopefully that fixes the problem.
Okay, the repository has not been deleted - the link was just broken. Here is the RCA issue: https://github.com/pytest-dev/pytest-metadata/issues/5 The fix has been included in 1.5.1, current is 1.7.0. I'll send in the PR for that version.
PR: https://github.com/gentoo/gentoo/pull/8742
Toralf, the PR was just merged. Do you want to update and rerun the tests immediately or wait for the automated tests?
(In reply to Nelo-T. Wallus (ntnn) from comment #22) rerun it at the same image and got : tests/flexmock_test.py:1388: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../flexmock-0.10.2-python3_5/lib/flexmock.py:945: in mock_method self, name, arguments) ../flexmock-0.10.2-python3_5/lib/flexmock.py:135: in get_flexmock_expectation cls._verify_call_order(found, args) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = <class 'flexmock.FlexmockContainer'> expectation = <flexmock.Expectation object at 0x7f973f3de748> args = {'kargs': (), 'kwargs': {}} @classmethod def _verify_call_order(cls, expectation, args): if not cls.ordered: next_method = cls.last else: next_method = cls.ordered.pop(0) cls.last = next_method if expectation is not next_method: raise CallOrderError( '%s called before %s' % (_format_args(expectation.name, args), > _format_args(next_method.name, next_method.args))) E flexmock.CallOrderError: bar() called before bar("b") ../flexmock-0.10.2-python3_5/lib/flexmock.py:149: CallOrderError =============================== warnings summary =============================== None pytest-catchlog plugin has been merged into the core, please remove it from your requirements. tests/flexmock_nose_test.py::test_module_level_generator yield tests are deprecated, and scheduled to be removed in pytest 4.0 tests/flexmock_nose_test.py::TestRegularClass::()::test_class_level_generator_tests yield tests are deprecated, and scheduled to be removed in pytest 4.0 -- Docs: http://doc.pytest.org/en/latest/warnings.html ======== 12 failed, 1003 passed, 1 xfailed, 3 warnings in 12.40 seconds ======== * ERROR: dev-python/flexmock-0.10.2::gentoo failed (test phase): but maybe that image (it has now 10,000 packages and is at his life end) is broken ?
Might be, but it'd still be strange. We'll keep this open, if this doesn't hit in a new tinderbox and/or if I can\t replicate it can still be closed. Thanks.
I've tried to replicate this in a clean chroot, but I'm unable to replicate the error. I'll close this for now, if the issue occurs again I'll follow up on it further.