diff options
author | Bruno Oliveira <nicoddemus@gmail.com> | 2016-11-20 18:59:15 -0200 |
---|---|---|
committer | Bruno Oliveira <nicoddemus@gmail.com> | 2016-11-20 18:59:15 -0200 |
commit | 1eb5a690d4c416962b6ccf46618367f68e54ea89 (patch) | |
tree | 6d9b8c722c6d78747f5c617fcfd1145c61065558 /_pytest/assertion | |
parent | cbf261c74ef1713f88ac56f2c382f096b252dedb (diff) | |
download | pytest-1eb5a690d4c416962b6ccf46618367f68e54ea89.tar.gz |
Fix flake8 E305 and E306 errors
These errors started to appear with flake8-3.1.1, while they don't appear with
version 3.1.0 (weird).
Diffstat (limited to '_pytest/assertion')
-rw-r--r-- | _pytest/assertion/__init__.py | 2 | ||||
-rw-r--r-- | _pytest/assertion/rewrite.py | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/_pytest/assertion/__init__.py b/_pytest/assertion/__init__.py index fd1ebe2c1..18cb7d32c 100644 --- a/_pytest/assertion/__init__.py +++ b/_pytest/assertion/__init__.py @@ -80,10 +80,12 @@ def install_importhook(config): config._assertstate.hook = hook = rewrite.AssertionRewritingHook(config) sys.meta_path.insert(0, hook) config._assertstate.trace('installed rewrite import hook') + def undo(): hook = config._assertstate.hook if hook is not None and hook in sys.meta_path: sys.meta_path.remove(hook) + config.add_cleanup(undo) return hook diff --git a/_pytest/assertion/rewrite.py b/_pytest/assertion/rewrite.py index 6b4c1f483..c2098936d 100644 --- a/_pytest/assertion/rewrite.py +++ b/_pytest/assertion/rewrite.py @@ -276,6 +276,7 @@ def _write_pyc(state, co, source_stat, pyc): fp.close() return True + RN = "\r\n".encode("utf-8") N = "\n".encode("utf-8") |