{"action":"opened","issue":{"url":"https://api.github.com/repos/nose-devs/nose/issues/978","labels_url":"https://api.github.com/repos/nose-devs/nose/issues/978/labels{/name}","comments_url":"https://api.github.com/repos/nose-devs/nose/issues/978/comments","events_url":"https://api.github.com/repos/nose-devs/nose/issues/978/events","html_url":"https://github.com/nose-devs/nose/issues/978","id":124215211,"number":978,"title":"ImportError in code produces AttributeError: 'module' object has no attribute 'tests'","user":{"login":"LukasRychtecky","id":585068,"avatar_url":"https://avatars.githubusercontent.com/u/585068?v=3","gravatar_id":"","url":"https://api.github.com/users/LukasRychtecky","html_url":"https://github.com/LukasRychtecky","followers_url":"https://api.github.com/users/LukasRychtecky/followers","following_url":"https://api.github.com/users/LukasRychtecky/following{/other_user}","gists_url":"https://api.github.com/users/LukasRychtecky/gists{/gist_id}","starred_url":"https://api.github.com/users/LukasRychtecky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LukasRychtecky/subscriptions","organizations_url":"https://api.github.com/users/LukasRychtecky/orgs","repos_url":"https://api.github.com/users/LukasRychtecky/repos","events_url":"https://api.github.com/users/LukasRychtecky/events{/privacy}","received_events_url":"https://api.github.com/users/LukasRychtecky/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-29T14:01:22Z","updated_at":"2015-12-29T14:01:22Z","closed_at":null,"body":"In case I have an ImportError in my code Nose ends with \"AttributeError: 'module' object has no attribute 'tests'\". It's really painful to find an origin error. E.g.:\r\n\r\nfoo/tests.py (models has no class named like Bar)\r\n```\r\nfrom bar.models import Bar\r\n```\r\n\r\nWhen I want to run tests in foo.tests Nose raises AttributeError instead of ImportError.\r\n\r\nI'll attach a simple patch."}}