{"comment":{"url":"https://api.github.com/repos/clebergnu/avocado/comments/13638606","html_url":"https://github.com/clebergnu/avocado/commit/c3021ed0494762357091362d6343151e72f63119#commitcomment-13638606","id":13638606,"user":{"login":"ldoktor","id":1074021,"avatar_url":"https://avatars.githubusercontent.com/u/1074021?v=3","gravatar_id":"","url":"https://api.github.com/users/ldoktor","html_url":"https://github.com/ldoktor","followers_url":"https://api.github.com/users/ldoktor/followers","following_url":"https://api.github.com/users/ldoktor/following{/other_user}","gists_url":"https://api.github.com/users/ldoktor/gists{/gist_id}","starred_url":"https://api.github.com/users/ldoktor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ldoktor/subscriptions","organizations_url":"https://api.github.com/users/ldoktor/orgs","repos_url":"https://api.github.com/users/ldoktor/repos","events_url":"https://api.github.com/users/ldoktor/events{/privacy}","received_events_url":"https://api.github.com/users/ldoktor/received_events","type":"User","site_admin":false},"position":64,"line":604,"path":"avocado/core/loader.py","commit_id":"c3021ed0494762357091362d6343151e72f63119","created_at":"2015-10-07T13:36:40Z","updated_at":"2015-10-07T13:36:40Z","body":"Yes, in a single statement:\r\n\r\n```diff\r\n@@ -618,16 +613,18 @@ class FileLoader(TestLoader):\r\n                     continue\r\n \r\n                 if test_import:\r\n-                    base_ids = [base.id for base in statement.bases]\r\n+                    base_ids = [base.id for base in statement.bases\r\n+                                if hasattr(base, 'id')]\r\n                     # Looking for a 'class FooTest(Test):'\r\n                     if test_import_name in base_ids:\r\n                         functions = [st.name for st in statement.body if\r\n                                      isinstance(st, ast.FunctionDef) and\r\n                                      st.name.startswith('test')]\r\n                         result[statement.name] = functions\r\n+                        continue\r\n \r\n                 # Looking for a 'class FooTest(avocado.Test):'\r\n-                elif mod_import:\r\n+                if mod_import:\r\n                     for base in statement.bases:\r\n                         module = base.value.id\r\n                         klass = base.attr\r\n\r\n```\r\n\r\nto test it use:\r\n```python\r\nfrom avocado import Test\r\nimport avocado\r\nimport fmaslkfdsaf\r\n\r\nclass First(Test):\r\n    \"\"\"\r\n    :avocado: disable\r\n    \"\"\"\r\n    def test(self):\r\n        class Third(Test):\r\n            \"\"\"\r\n            :avocado: enable\r\n            \"\"\"\r\n            def test_2(self):\r\n                pass\r\n        class Fourth(Second):\r\n            \"\"\"\r\n            :avocado: enable\r\n            \"\"\"\r\n            def test_3(self):\r\n                pass\r\n        pass\r\n    # Looking for a 'class FooTest(avocado.Test):'\r\n-                elif mod_import:\r\n+                if mod_import:\r\n                     for base in statement.bases:\r\n                         module = base.value.id\r\n                         klass = base.attr\r\n\r\n```\r\n\r\nto test it use:\r\n```python\r\nfrom avocado import Test\r\nimport avocado\r\n\r\nclass Second(avocado.Test):\r\n    def test_1(self):\r\n        pass\r\n```"}}