diff options
| author | Michele Simionato <michele.simionato@gmail.com> | 2015-03-16 15:26:20 +0100 |
|---|---|---|
| committer | Michele Simionato <michele.simionato@gmail.com> | 2015-03-16 15:26:20 +0100 |
| commit | cbc46b5c31e82cdf06336f8aa96527bb0b33dfd2 (patch) | |
| tree | e558d7fed5459692e19db548e7fc18c20a047788 /documentation3.py | |
| parent | 6f3bf75e285f6632d5be0201d090ea158f18ad7c (diff) | |
| download | python-decorator-git-cbc46b5c31e82cdf06336f8aa96527bb0b33dfd2.tar.gz | |
Added a script test.py working both with Python 2 and 3
Diffstat (limited to 'documentation3.py')
| -rw-r--r-- | documentation3.py | 8 |
1 files changed, 1 insertions, 7 deletions
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) |
