mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
some manual py2 cleanups
This commit is contained in:
parent
30c1e8289f
commit
ab19b94811
23 changed files with 31 additions and 59 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import os
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
import pytest
|
||||
|
||||
from pre_commit.envcontext import envcontext
|
||||
|
|
@ -91,11 +91,11 @@ def test_exception_safety():
|
|||
class MyError(RuntimeError):
|
||||
pass
|
||||
|
||||
env = {}
|
||||
env = {'hello': 'world'}
|
||||
with pytest.raises(MyError):
|
||||
with envcontext([('foo', 'bar')], _env=env):
|
||||
raise MyError()
|
||||
assert env == {}
|
||||
assert env == {'hello': 'world'}
|
||||
|
||||
|
||||
def test_integration_os_environ():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue