diff options
author | Georg Brandl <georg@python.org> | 2018-11-28 16:42:15 +0100 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2018-11-28 16:42:15 +0100 |
commit | cd850106ed356cd56c2bf19e0eebd75c42780556 (patch) | |
tree | 44484ae1e497b8a27117ec7c0288ddeb97807167 /tests | |
parent | 42bcf76904ad6ccf1005296a8d1688ebe1bc562d (diff) | |
download | pygments-cd850106ed356cd56c2bf19e0eebd75c42780556.tar.gz |
Fix more instances of invalid string escapes
Also, raise on warnings from Pygments only.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/run.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/tests/run.py b/tests/run.py index 161e5c04..2e962f2f 100644 --- a/tests/run.py +++ b/tests/run.py @@ -22,6 +22,13 @@ import warnings if os.path.dirname(__file__): os.chdir(os.path.dirname(__file__)) +# make FutureWarnings (coming from Regex syntax most likely) and +# DeprecationWarnings due to non-raw strings an error +warnings.filterwarnings("error", module=r"pygments\..*", + category=FutureWarning) +warnings.filterwarnings("error", module=r".*pygments.*", + category=DeprecationWarning) + try: import nose @@ -32,12 +39,6 @@ except ImportError: # make sure the current source is first on sys.path sys.path.insert(0, '..') -# make FutureWarnings (coming from Regex syntax most likely) and -# DeprecationWarnings (coming from invalid escapes due to non-raw strings) -# an error -warnings.filterwarnings("error", category=FutureWarning) -warnings.filterwarnings("error", category=DeprecationWarning) - if '--with-coverage' not in sys.argv: # if running with coverage, pygments should not be imported before coverage # is started, otherwise it will count already executed lines as uncovered |