From cbc46b5c31e82cdf06336f8aa96527bb0b33dfd2 Mon Sep 17 00:00:00 2001 From: Michele Simionato Date: Mon, 16 Mar 2015 15:26:20 +0100 Subject: Added a script test.py working both with Python 2 and 3 --- documentation3.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'documentation3.py') diff --git a/documentation3.py b/documentation3.py index 92adac8..dea3821 100644 --- a/documentation3.py +++ b/documentation3.py @@ -1062,11 +1062,10 @@ class Action(object): """ >>> a = Action() >>> a.view() # ok - >>> a.insert() # err + >>> a.insert() # doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): ... PermissionError: User does not have the permission to run insert! - """ @restricted(User) def view(self): @@ -1207,8 +1206,3 @@ def hello(user): AFTER """ print('hello %s' % user) - -if __name__ == '__main__': - import doctest - err = doctest.testmod()[0] - sys.exit(err) -- cgit v1.2.1