{"action":"opened","issue":{"url":"https://api.github.com/repos/nengo/nengo/issues/792","labels_url":"https://api.github.com/repos/nengo/nengo/issues/792/labels{/name}","comments_url":"https://api.github.com/repos/nengo/nengo/issues/792/comments","events_url":"https://api.github.com/repos/nengo/nengo/issues/792/events","html_url":"https://github.com/nengo/nengo/issues/792","id":95519688,"number":792,"title":"Running py.test fails epically","user":{"login":"Seanny123","id":1918825,"avatar_url":"https://avatars.githubusercontent.com/u/1918825?v=3","gravatar_id":"","url":"https://api.github.com/users/Seanny123","html_url":"https://github.com/Seanny123","followers_url":"https://api.github.com/users/Seanny123/followers","following_url":"https://api.github.com/users/Seanny123/following{/other_user}","gists_url":"https://api.github.com/users/Seanny123/gists{/gist_id}","starred_url":"https://api.github.com/users/Seanny123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Seanny123/subscriptions","organizations_url":"https://api.github.com/users/Seanny123/orgs","repos_url":"https://api.github.com/users/Seanny123/repos","events_url":"https://api.github.com/users/Seanny123/events{/privacy}","received_events_url":"https://api.github.com/users/Seanny123/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-16T20:24:14Z","updated_at":"2015-07-16T20:24:14Z","closed_at":null,"body":"On my Ubuntu 14.04 system running the 3.15 linux kernel, running all the tests using py.test fails horribly.\r\n\r\n```\r\nsean@hybrid:~/GitHub-linux/nengo_spa_fix$ py.test --pyargs nengo\r\n============================= test session starts ==============================\r\nplatform linux2 -- Python 2.7.6 -- py-1.4.30 -- pytest-2.7.2\r\nrootdir: /home/sean/GitHub-linux/nengo_spa_fix, inifile: setup.cfg\r\ncollected 630 items \r\n\r\nnengo/networks/tests/test_actionselection.py ..\r\nnengo/networks/tests/test_circularconv.py .......\r\nnengo/networks/tests/test_ensemblearray.py .........\r\nnengo/networks/tests/test_integrator.py .\r\nnengo/networks/tests/test_oscillator.py .\r\nnengo/networks/tests/test_product.py .\r\nnengo/networks/tests/test_workingmemory.py .\r\nnengo/spa/tests/test_action_objects.py ........\r\nnengo/spa/tests/test_actions.py ......\r\nnengo/spa/tests/test_assoc_mem.py .....\r\nnengo/spa/tests/test_basalganglia.py ..\r\nnengo/spa/tests/test_buffer.py ....\r\nnengo/spa/tests/test_compare.py ..\r\nnengo/spa/tests/test_cortical.py ......\r\nnengo/spa/tests/test_input.py ...\r\nnengo/spa/tests/test_memory.py .....\r\nnengo/spa/tests/test_pointer.py .................\r\nnengo/spa/tests/test_spa.py .\r\nnengo/spa/tests/test_thalamus.py s...\r\nnengo/spa/tests/test_vocabulary.py .........\r\nnengo/tests/test_base.py ...\r\nnengo/tests/test_builder.py .........\r\nnengo/tests/test_cache.py ........................s\r\nnengo/tests/test_config.py .......\r\nnengo/tests/test_connection.py ..................................................................................\r\nnengo/tests/test_dists.py ......................\r\nnengo/tests/test_ensemble.py ..........................................................\r\nnengo/tests/test_examples.py ..........................ssssssssssssssssFF........................................\r\nnengo/tests/test_learning_rules.py ...................\r\nnengo/tests/test_network.py .....\r\nnengo/tests/test_neurons.py ..................\r\nnengo/tests/test_node.py ..............\r\nnengo/tests/test_params.py ............\r\nnengo/tests/test_probe.py .........\r\nnengo/tests/test_processes.py ..............\r\nnengo/tests/test_pytest.py .\r\nnengo/tests/test_simulator.py ......\r\nnengo/tests/test_solvers.py ..........s.......ssssssssssss\r\nnengo/tests/test_synapses.py .........\r\nnengo/utils/tests/test_builder.py .\r\nnengo/utils/tests/test_builder_graphviz.py .\r\nnengo/utils/tests/test_builder_passthrough.py ...\r\nnengo/utils/tests/test_cache.py ...\r\nnengo/utils/tests/test_compat.py .\r\nnengo/utils/tests/test_connection.py ....................\r\nnengo/utils/tests/test_ensemble.py .................\r\nnengo/utils/tests/test_filter_design.py ....\r\nnengo/utils/tests/test_functions_piecewise.py .......\r\nnengo/utils/tests/test_graphs.py ...\r\nnengo/utils/tests/test_logging.py ..\r\nnengo/utils/tests/test_magic.py ......\r\nnengo/utils/tests/test_matplotlib.py ss\r\nnengo/utils/tests/test_nco.py .......\r\nnengo/utils/tests/test_network.py .\r\nnengo/utils/tests/test_neurons.py ..s\r\nnengo/utils/tests/test_numpy.py .\r\nnengo/utils/tests/test_probe.py ....\r\nnengo/utils/tests/test_progress.py ...........\r\nnengo/utils/tests/test_stdlib.py F.....\r\nnengo/utils/tests/test_testing.py ......\r\n\r\n=================================== FAILURES ===================================\r\n_ test_nooutput[/home/sean/GitHub-linux/nengo_spa_fix/examples/integrator-2d] __\r\n\r\nnb_file = '/home/sean/GitHub-linux/nengo_spa_fix/examples/integrator-2d'\r\n\r\n    @pytest.mark.example\r\n    @pytest.mark.parametrize('nb_file', all_examples)\r\n    def test_nooutput(nb_file):\r\n        \"\"\"Ensure that no cells have output.\"\"\"\r\n        pytest.importorskip(\"IPython\", minversion=\"1.0\")\r\n        pytest.importorskip(\"jinja2\")\r\n        from nengo.utils.ipython import load_notebook\r\n    \r\n        def check_all(cells):\r\n            for cell in cells:\r\n                if cell.cell_type == 'code':\r\n                    assert cell.outputs == [], (\"Clear outputs in %s\" % nb_path)\r\n    \r\n        nb_path = os.path.join(examples_dir, \"%s.ipynb\" % nb_file)\r\n        nb = load_notebook(nb_path)\r\n        if nb.nbformat <= 3:\r\n            for ws in nb.worksheets:\r\n>               check_all(ws.cells)\r\n\r\nnengo/tests/test_examples.py:100: \r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \r\n\r\ncells = [{u'source': u'# Nengo Example: Integrator\\n\\nThis demo implements a one-dimens...ations (e.g. soft normalization).', ...tadata': {}}, {u'source': u'## Step 3: Connect the network elements', u'cell_type': u'markdown', u'metadata': {}}, ...]\r\n\r\n    def check_all(cells):\r\n        for cell in cells:\r\n            if cell.cell_type == 'code':\r\n>               assert cell.outputs == [], (\"Clear outputs in %s\" % nb_path)\r\nE               AssertionError: Clear outputs in /home/sean/GitHub-linux/nengo_spa_fix/examples/integrator-2d.ipynb\r\nE               assert [{u'output_ty...da7dc02d90>'}] == []\r\nE                 Left contains more items, first extra item: {u'output_type': u'display_data', u'javascript': u'\\n        require([\"widgets...metadata': {}, u'text': u'<IPython.core.display.Javascript at 0x7fda7dc02d90>'}\r\nE                 Use -v to get the full diff\r\n\r\nnengo/tests/test_examples.py:94: AssertionError\r\n_ test_nooutput[/home/sean/GitHub-linux/nengo_spa_fix/examples/integrator-EA] __\r\n\r\nnb_file = '/home/sean/GitHub-linux/nengo_spa_fix/examples/integrator-EA'\r\n\r\n    @pytest.mark.example\r\n    @pytest.mark.parametrize('nb_file', all_examples)\r\n    def test_nooutput(nb_file):\r\n        \"\"\"Ensure that no cells have output.\"\"\"\r\n        pytest.importorskip(\"IPython\", minversion=\"1.0\")\r\n        pytest.importorskip(\"jinja2\")\r\n        from nengo.utils.ipython import load_notebook\r\n    \r\n        def check_all(cells):\r\n            for cell in cells:\r\n                if cell.cell_type == 'code':\r\n                    assert cell.outputs == [], (\"Clear outputs in %s\" % nb_path)\r\n    \r\n        nb_path = os.path.join(examples_dir, \"%s.ipynb\" % nb_file)\r\n        nb = load_notebook(nb_path)\r\n        if nb.nbformat <= 3:\r\n            for ws in nb.worksheets:\r\n>               check_all(ws.cells)\r\n\r\nnengo/tests/test_examples.py:100: \r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \r\n\r\ncells = [{u'source': u'# Nengo Example: Integrator\\n\\nThis demo implements a one-dimens...ations (e.g. soft normalization).', ...tadata': {}}, {u'source': u'## Step 3: Connect the network elements', u'cell_type': u'markdown', u'metadata': {}}, ...]\r\n\r\n    def check_all(cells):\r\n        for cell in cells:\r\n            if cell.cell_type == 'code':\r\n>               assert cell.outputs == [], (\"Clear outputs in %s\" % nb_path)\r\nE               AssertionError: Clear outputs in /home/sean/GitHub-linux/nengo_spa_fix/examples/integrator-EA.ipynb\r\nE               assert [{u'output_ty...869bbc9e10>'}] == []\r\nE                 Left contains more items, first extra item: {u'output_type': u'pyout', u'prompt_number': 24, u'metadata': {}, u'text': u'<matplotlib.legend.Legend at 0x7f869bb5fc10>'}\r\nE                 Use -v to get the full diff\r\n\r\nnengo/tests/test_examples.py:94: AssertionError\r\n______________________________ test_checked_call _______________________________\r\n\r\n    def test_checked_call():\r\n        def func1(a):\r\n            return a\r\n    \r\n        def func2(a, b=0, **kwargs):\r\n            return a+b\r\n    \r\n        def func3(a, b=0, c=0, *args, **kwargs):\r\n            return a+b+c+sum(args)\r\n    \r\n        func4 = lambda x=[0]: sum(x)\r\n    \r\n        class A(object):\r\n            def __call__(self, a, b):\r\n                return a + b\r\n    \r\n        assert checked_call(func1) == (None, False)\r\n        assert checked_call(func1, 1) == (1, True)\r\n        assert checked_call(func1, 1, 2) == (None, False)\r\n        assert checked_call(func1, 1, two=2) == (None, False)\r\n    \r\n        assert checked_call(func2) == (None, False)\r\n        assert checked_call(func2, 1) == (1, True)\r\n        assert checked_call(func2, 1, 2) == (3, True)\r\n        assert checked_call(func2, 1, 2, three=3) == (3, True)\r\n        assert checked_call(func2, 1, 2, 3) == (None, False)\r\n    \r\n        assert checked_call(func3) == (None, False)\r\n        assert checked_call(func3, 1) == (1, True)\r\n        assert checked_call(func3, 1, 2) == (3, True)\r\n        assert checked_call(func3, 1, 2, 3) == (6, True)\r\n        assert checked_call(func3, 1, 2, 3, 4, 5, 6) == (21, True)\r\n    \r\n        assert checked_call(func4) == (0, True)\r\n        assert checked_call(func4, [1, 2]) == (3, True)\r\n        assert checked_call(func4, [1], 2) == (None, False)\r\n    \r\n        assert checked_call(A(), 1) == (None, False)\r\n        assert checked_call(A(), 1, 2) == (3, True)\r\n        assert checked_call(A(), 1, 2, 3) == (None, False)\r\n    \r\n        assert checked_call(np.sin) == (None, False)\r\n        assert checked_call(np.sin, 0) == (0, True)\r\n>       assert checked_call(np.sin, 0, np.array([1])) == (np.array([0]), True)\r\nE       assert CheckedCall(v...invoked=False) == (array([0]), True)\r\nE         At index 0 diff: None != array([0])\r\nE         Use -v to get the full diff\r\n\r\nnengo/utils/tests/test_stdlib.py:50: AssertionError\r\n============== 3 failed, 593 passed, 34 skipped in 148.92 seconds ==============\r\n```\r\n\r\nThese seem to be pretty simple stdlib functions. Any idea why they might be failing?"}}