Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
viljarjf committed Nov 7, 2024
1 parent d399caf commit e809c11
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions tests/test_deprecated.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import pytest

from instamatic.utils.deprecated import deprecated, VisibleDeprecationWarning
from instamatic.utils.deprecated import VisibleDeprecationWarning, deprecated


def test_basic():
Expand All @@ -11,7 +11,8 @@ def foo() -> int:
return 1

with pytest.warns(
VisibleDeprecationWarning, match='Function foo is deprecated since 2.0, use bar instead.'
VisibleDeprecationWarning,
match='Function foo is deprecated since 2.0, use bar instead.',
):
assert foo() == 1

Expand All @@ -35,7 +36,8 @@ def bar(self) -> int:
return 1

with pytest.warns(
VisibleDeprecationWarning, match='Function bar is deprecated since 2.0, use baz instead.'
VisibleDeprecationWarning,
match='Function bar is deprecated since 2.0, use baz instead.',
):
foo = Foo()
assert foo.bar() == 1
Expand All @@ -49,7 +51,8 @@ def bar(cls) -> int:
return 1

with pytest.warns(
VisibleDeprecationWarning, match='Function bar is deprecated since 2.0, use baz instead.'
VisibleDeprecationWarning,
match='Function bar is deprecated since 2.0, use baz instead.',
):
foo = Foo()
assert foo.bar() == 1
Expand All @@ -66,7 +69,8 @@ def bar() -> int:
foo = Foo()

with pytest.warns(
VisibleDeprecationWarning, match='Function bar is deprecated since 2.0, use baz instead.'
VisibleDeprecationWarning,
match='Function bar is deprecated since 2.0, use baz instead.',
):
assert foo.bar() == 1
assert Foo.bar() == 1

0 comments on commit e809c11

Please sign in to comment.