python3Packages.psycopg: disable test_sched{,_error} on darwin
They are prone to race conditions. ``` _______________________________ test_sched_error _______________________________ caplog = <_pytest.logging.LogCaptureFixture object at 0x197218a90> @pytest.mark.slow def test_sched_error(caplog): caplog.set_level(logging.WARNING, logger="psycopg") s = Scheduler() t = Thread(target=s.run, daemon=True) t.start() results = [] def worker(i): results.append((i, time())) def error(): 1 / 0 t0 = time() s.enter(0.1, partial(worker, 1)) s.enter(0.4, None) s.enter(0.3, partial(worker, 2)) s.enter(0.2, error) t.join() t1 = time() assert t1 - t0 == pytest.approx(0.4, 0.1) assert len(results) == 2 assert results[0][0] == 1 > assert results[0][1] - t0 == pytest.approx(0.1, 0.1) E assert 0.11003494262695312 == 0.1 ± 1.0e-02 E comparison failed E Obtained: 0.11003494262695312 E Expected: 0.1 ± 1.0e-02 tests/pool/test_sched.py:93: AssertionError ```
This commit is contained in:
parent
2f51f9b748
commit
803c563622
1 changed files with 4 additions and 0 deletions
|
@ -180,6 +180,10 @@ buildPythonPackage rec {
|
|||
# don't depend on mypy for tests
|
||||
"test_version"
|
||||
"test_package_version"
|
||||
] ++ lib.optionals (stdenv.isDarwin) [
|
||||
# racy test
|
||||
"test_sched"
|
||||
"test_sched_error"
|
||||
];
|
||||
|
||||
disabledTestPaths = [
|
||||
|
|
Loading…
Reference in a new issue