Skip to content

Declare PROVISIONAL status for test_utils and pytest plugins #1154

@asvetlov

Description

@asvetlov

I've made a mistake by accepting #902 and #914 without very careful review and adopting aiohttp tests to using this technologies.

Both was published in 0.22 release.

But after this on test rewriting others and I have found some quirks.

We have fixed one of them: after #1083 test_client fixture accepts app as well as factory.
I believe the factory should be deprecated: the new api is much simpler and obvious.

After that I've split TestClient functionality into itself and TestServer -- all is done for good and doesn't bring backward compatibility.

The next spike is: on testing client I want to pass custom connector instance into the test_client fixture.
We could add a connector param only if the first parameter is web.Application instance, not factory.

But it's brings cognitive mess again. Maybe we'll find another problems in testing API in the near future.

Conclusion
Sorry for so long introduction.

I propose to:

  • Declare testing API as provisional.
  • Feel free to break the API in next aiohttp release (but keep trying to support it at least for next release).
  • Our current deprecation period is about 1.5 years for stable code. For testing API it could be much shorter on real use case demand (half an year probably).

Objections?

P.S.
@toumorokoshi and @samuelcolvin please don't get me wrong.
I've been very excited by your contributions into aiohttp testing tools.
The requested feature had had existed for very long ago.
I very appreciate your help.
Don't know when I was able to invest a time into the problem.
I just want to thank you.

But the first pancake is always lumpy, you know.

I have a feeling the support period for Test API solutions which are proven as not perfect should be reduced.
And we should not hesitate to break test API if keeping support of already presented solutions is not possible or maintenance burden is too high.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions