Source: datalad
Version: 0.18.1-1
Tags: ftbfs

Hi Maintainer

As can be seen on reproducible builds [1], datalad 0.18.1-1 often
FTBFS there.  I've copied what I hope is the relevant part of the log
below.

Regards
Graham


[1] https://tests.reproducible-builds.org/debian/rb-pkg/datalad.html


=================================== FAILURES ===================================
_____________________________ test_gracefull_death _____________________________

    def test_gracefull_death():

        def assert_provides_and_raises(pc, exception, target=None):
            """Helper to get all results before exception is raised"""
            results = []
            with assert_raises(exception):
                for r in pc:
                    results.append(r)
            # results should be sorted since we do not guarantee order
            results = sorted(results)
            if target is not None:
                assert_equal(results, target)
            return results

        def interrupted_producer():
            yield 1
            raise ValueError()

        def consumer(i):
            sleep(0.001)
            yield i

        assert_provides_and_raises(
            ProducerConsumer(interrupted_producer(), consumer,
jobs=3), ValueError, [1])

        def faulty_consumer(i):
            sleep(0.001)
            if i == 1:
                raise ValueError()
            return i

        # so we do not get failed, but other parallel ones finish their job
        results = assert_provides_and_raises(
            ProducerConsumer(range(1000), faulty_consumer, jobs=5), ValueError)
        # and analysis of futures to raise an exception can take some
time etc, so
        # we could get more, but for sure we should not get all 999
and not even a 100
        if info_log_level:
>           assert_greater(100, len(results))

datalad/support/tests/test_parallel.py:177:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

first = 100, second = 245, msg = None

    def assert_greater(first, second, msg=None):
        if msg is None:
>           assert first > second
E           assert 100 > 245

Reply via email to