File: ignoreuserwarning.patch

package info (click to toggle)
python-tornado 3.2.2-1.1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 2,484 kB
  • ctags: 3,300
  • sloc: python: 18,264; sh: 139; ansic: 45; makefile: 41; xml: 26; sql: 25
file content (13 lines) | stat: -rw-r--r-- 717 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
Description: ignore userwarning in tests
 Required to run tests from source with the package already installed.
 Else one gets check_version_conflict warning from pkg_resources.
--- a/tornado/test/runtests.py
+++ b/tornado/test/runtests.py
@@ -72,6 +72,7 @@ if __name__ == '__main__':
     # setuptools sometimes gives ImportWarnings about things that are on
     # sys.path even if they're not being used.
     warnings.filterwarnings("ignore", category=ImportWarning)
+    warnings.filterwarnings("ignore", category=UserWarning)
     # Tornado generally shouldn't use anything deprecated, but some of
     # our dependencies do (last match wins).
     warnings.filterwarnings("ignore", category=DeprecationWarning)