Closed tomwhite closed 6 months ago
I've added some tests, but they are written using pytest
features such as tmp_path
and parameterization. Is it possible to change things to use pytest
to run the tests? (It can run regular Python unit tests, but not vice versa.)
I've added some tests, but they are written using
pytest
features such astmp_path
and parameterization. Is it possible to change things to usepytest
to run the tests?
The use of unittest
is baked into lithops test
, so it's not trivial to switch to pytest
unfortunately. I've converted the retries test to use unittest
now.
This is now ready for review @JosepSampe.
Thanks @tomwhite Looks really good! I will check in the future how to switch the tests to pytest to benefit from its futures.
Thanks @tomwhite Looks really good!
Thank you - and thanks for merging it!
I will check in the future how to switch the tests to pytest to benefit from its futures.
I think that would be a good change. It's easy to parameterize pytest in lots of ways so you can still benefit from running the Lithops tests against different executors and storage backends.
Fixes #1289
This is a first draft - it still needs API doc and tests.
As noted in #1289 this uses wrappers around
ResponseFuture
andFunctionExecutor
. I considered using subclasses, but that wasn't possible forResponseFuture
becauseRetryingFuture
updates the underlyingResponseFuture
for each retry. AndFunctionExecutor
already has subclasses (LocalhostExecutor
,ServerlessExecutor
, andStandaloneExecutor
), so that wasn't possible either.It might be possible to add the retry logic directly into the existing
ResponseFuture
andFunctionExecutor
classes, but I'm not familiar enough with the internals, so I wasn't sure how easy that would be or if it's even desirable. @JosepSampe what do you think?The current implementation in this PR also lacks some of the methods that
FunctionExecutor
has:call_async
,map_reduce
, andget_result
. It would be possible to add these (probably later), but I haven't needed them so I haven't spent any time looking at what's needed.Developer's Certificate of Origin 1.1