diff options
Diffstat (limited to 'deluge/tests/__init__.py')
-rw-r--r-- | deluge/tests/__init__.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/deluge/tests/__init__.py b/deluge/tests/__init__.py new file mode 100644 index 0000000..7b6afa1 --- /dev/null +++ b/deluge/tests/__init__.py @@ -0,0 +1,17 @@ +# Increase open file descriptor limit to allow tests to run +# without getting error: what(): epoll: Too many open files +from deluge.i18n import setup_translation + +try: + import resource +except ImportError: # Does not exist on Windows + pass +else: + try: + resource.setrlimit(resource.RLIMIT_NOFILE, (65536, 65536)) + except (ValueError, resource.error) as ex: + error = 'Failed to raise file descriptor limit: %s' % ex + # print(error) + +# Initialize gettext +setup_translation() |