Fix a test failure with recent versions of ... Pytest? Python? Taken from upstream: https://github.com/keras-team/keras/commit/fe35050a8f18dc52304aa8da4e463eececa25240 diff --git a/tests/integration_tests/applications_test.py b/tests/integration_tests/applications_test.py index 979f2f2abd6..6e3b57fa8e2 100644 --- a/tests/integration_tests/applications_test.py +++ b/tests/integration_tests/applications_test.py @@ -58,7 +58,8 @@ def _test_application_basic(app, last_dim=1000): def _test_application_notop(app, last_dim): output_shape = _get_output_shape( lambda: app(weights=None, include_top=False)) - assert output_shape == (None, None, None, last_dim) + assert len(output_shape) == 4 + assert output_shape[-1] == last_dim def test_mobilenet_v2_legacy_import(): o-scripts Wojtek's customized Guix
aboutsummaryrefslogtreecommitdiff
path: root/tests/texlive.scm
AgeCommit message (Expand)Author
2021-03-06tests: do not hard code HTTP ports...Previously, test cases could fail if some process was listening at a hard-coded port. This patch eliminates most of these potential failures, by automatically assigning an unbound port. This should allow for building multiple guix trees in parallel outside a build container, though this is currently untested. The test "home-page: Connection refused" in tests/lint.scm still hardcodes port 9999, however. * guix/tests/http.scm (http-server-can-listen?): remove now unused procedure. (%http-server-port): default to port 0, meaning the OS will automatically choose a port. (open-http-server-socket): remove the false statement claiming this procedure is exported and also return the allocated port number. (%local-url): raise an error if the port is obviously unbound. (call-with-http-server): set %http-server-port to the allocated port while the thunk is called. * tests/derivations.scm: adjust test cases to use automatically assign a port. As there is no risk of a port conflict now, do not make any tests conditional upon 'http-server-can-listen?' anymore. * tests/elpa.scm: likewise. * tests/lint.scm: likewise, and add a TODO comment about a port that is still hard-coded. * tests/texlive.scm: likewise. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Maxime Devos