Skip to content

Commit

Permalink
Do not use dataclass in tests for 3.8 compat
Browse files Browse the repository at this point in the history
  • Loading branch information
GabrielCappelli committed Jul 27, 2023
1 parent a64688f commit 7f2b028
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from dataclasses import dataclass
from typing import Protocol

import pytest
Expand All @@ -18,19 +17,19 @@ class IScopedService(Protocol):
...


@dataclass
class ScopedService(IScopedService):
singleton: ISingletonService
class ScopedService:
def __init__(self, singleton: ISingletonService) -> None:
self.singleton = singleton


class ITransientService(Protocol):
...


@dataclass
class TransientService(ITransientService):
singleton: ISingletonService
scoped: IScopedService
class TransientService:
def __init__(self, singleton: ISingletonService, scoped: IScopedService) -> None:
self.singleton = singleton
self.scoped = scoped


@pytest.fixture
Expand Down

0 comments on commit 7f2b028

Please sign in to comment.