diff options
Diffstat (limited to 'tests/import/module_getattr.py')
-rw-r--r-- | tests/import/module_getattr.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/import/module_getattr.py b/tests/import/module_getattr.py index 4a18f414d..df7a62181 100644 --- a/tests/import/module_getattr.py +++ b/tests/import/module_getattr.py @@ -10,13 +10,14 @@ except AttributeError: # define __getattr__ def __getattr__(attr): - if attr == 'does_not_exist': + if attr == "does_not_exist": return False raise AttributeError + # do feature test (will also test functionality if the feature exists) -if not hasattr(this, 'does_not_exist'): - print('SKIP') +if not hasattr(this, "does_not_exist"): + print("SKIP") raise SystemExit # check that __getattr__ works as expected |