Create pytest fixtures for integration tests
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- python
- Domain
- testing-qa
Research direction
Start by reading the existing integration tests and the package's current entry-point configuration. Define the fixture interface against the library's actual server and client APIs, then verify that the fixture is automatically available when the IRC library is installed in the test environment.
Written by the indexing model from the issue text.
Description
I imagine one could create a pytest fixture, one which starts the server and provides convenience functions for common assertions, such that a test could look something like:
def test_server_receives_message(irc_server):
client = irc_server.get_client(nick=’test_user')
client.pubmesg(“#test-channel”, “Hello message”)
assert irc_server.get_last_message().nick == ‘test_user’
assert irc_server.get_last_message().type == ‘pubmsg’
assert irc_server.get_last_message().message_text.startswith(“Hello”)
Note, that is not a spec, but more of a sketch of the idea. The actual interface would need to use names and methods that match the spec/implementation.
The test would be exposed through entry points such that the mere presence of this irc library in the test environment would make that fixture available.
- Dominant language
- Python
- Stars
- 422
- Forks
- 91
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from jaraco/irc
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Similar issues
-
cognition facet:consolidation memory ready size:S
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
proposal
Difficulty 1/5 Under an hour Newbie friendliness 68/100
j3ko/agent-plugins#29 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
-
area:cli area:security bug priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Judgment-Pack/judgment-pack-spec#335 ·
Maintainers usually reply within 1 day