File tree 3 files changed +11
-3
lines changed
3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 11
11
from importlib import metadata
12
12
from typing import final # noqa: ICN003
13
13
14
- __all__ = ["metadata" , "final" ]
14
+ if sys .version_info < (3 , 9 ):
15
+ import importlib_resources as resources
16
+ else :
17
+ from importlib import resources
18
+
19
+ __all__ = ["metadata" , "final" , "resources" ]
Original file line number Diff line number Diff line change
1
+ """Singer output samples, used for testing target behavior."""
Original file line number Diff line number Diff line change 7
7
import warnings
8
8
from pathlib import Path
9
9
10
+ from singer_sdk .helpers ._compat import resources
11
+ from singer_sdk .testing import target_test_streams
12
+
10
13
if t .TYPE_CHECKING :
11
14
from singer_sdk .streams import Stream
12
15
@@ -334,5 +337,4 @@ def singer_filepath(self) -> Path:
334
337
Returns:
335
338
The expected Path to this tests singer file.
336
339
"""
337
- current_dir = Path (__file__ ).resolve ().parent
338
- return current_dir / "target_test_streams" / f"{ self .name } .singer"
340
+ return resources .files (target_test_streams ).joinpath (f"{ self .name } .singer" ) # type: ignore[no-any-return] # noqa: E501
You can’t perform that action at this time.
0 commit comments