From f2251e17f20a82178cdb11c0c61ee4e5cdbfd8c4 Mon Sep 17 00:00:00 2001 From: Ian Lee Date: Mon, 15 Dec 2014 19:49:34 -0800 Subject: Add more test cases for E402; issue #304 --- testsuite/E40.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/testsuite/E40.py b/testsuite/E40.py index d921c25..1051e32 100644 --- a/testsuite/E40.py +++ b/testsuite/E40.py @@ -11,3 +11,28 @@ from foo.bar.yourclass import YourClass import myclass import foo.bar.yourclass +#: E402 +__all__ = ['abc'] + +import foo +#: Okay +try: + import foo +except: + pass +else: + print('imported foo') +finally: + print('made attempt to import foo') + +import bar +#: E402 +VERSION = '1.2.3' + +import foo +#: E402 +import foo + +a = 1 + +import bar -- cgit v1.2.1