dpytest


Namedpytest JSON
Version 0.7.0 PyPI version JSON
download
home_page
SummaryA package that assists in writing tests for discord.py
upload_time2023-06-19 15:42:57
maintainerCraftSpider, Sergeileduc
docs_urlNone
author
requires_python>=3.8
licenseThe MIT License (MIT) Copyright (c) 2018-2019 CraftSpider Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords discord discord.py test
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            # dpytest

[![Test CI](https://github.com/CraftSpider/dpytest/actions/workflows/test-ci.yml/badge.svg)](https://github.com/CraftSpider/dpytest/actions/workflows/test-ci.yml)
[![Lint](https://github.com/CraftSpider/dpytest/actions/workflows/lint-ci.yml/badge.svg)](https://github.com/CraftSpider/dpytest/actions/workflows/lint-ci.yml)
[![Documentation Status](https://readthedocs.org/projects/dpytest/badge/?version=latest)](https://dpytest.readthedocs.io/en/latest/?badge=latest)
[![Discord Server](https://img.shields.io/discord/523301176309972993.svg?label=Support%20Discord)](https://discord.gg/aNe8DqAuxd)

This is a package to allow testing of discord.py.
It is only compatible with the rewrite version, and is still in alpha.
If using pytest, it is suggested to use pytest-asyncio for test running, otherwise the user will need
to provide their own async test runner.

## Notice

For discord.py 1.7.X, use `dpytest 0.5.3`

For discord.py 2.X.X, use `dpytest>=0.6`

## Documentation

Documentation can be found at [dpytest.readthedocs.io](https://dpytest.readthedocs.io/en/latest/), including examples and tutorials

# History

## 0.7.0

⚠️ Warning ⚠️:

This can be **breaking** :

The `configure` function has changed.
It nows accepts either an `int` (like in the previous version) OR a `list` of `string` for the parameters `guilds`, `text_channels`, `voice_channels` and `members`.
But the names of the parameters had to be changed.

`num_guilds`, `num_text_channels`, `num_voice_channels`, `num_members` are DERECATED.

Example:

```python
    dpytest.configure(bot,
                      guilds=["CoolGuild", "LameGuild"],
                      text_channels=["Fruits", "Videogames"],
                      voice_channels=2,
                      members=["Joe", "Jack", "William", "Averell"])
```

Other changes:

- fixes in typing
- add `content_type` to `dict_from_attachment()`

## 0.6.8

Test agains discord.py 2.3

## 0.6.7

Fix bug in channel_history

Fix issue #111

## 0.6.6

Support asyncio tasks that have no \_\_name\_\_

## 0.6.5

This release allows testing with Voice Channels.

New :

- `FakeVoiceChannel` and `FakeVoiceClient` classes implemetation
- New tests

Changes :

- `create_channel` method can create voice channel

⚠️ Warning ⚠️:

This can be **breaking** :

the `configure()` function DOESN'T take the keyword parameter `num_channels` anymore, but instead :
`num_text_channels` and `num_voice_channels`

## 0.6.4

- Fix: edit message doesn't update message queue
- Refactor **init**.py import to be explicit exports as per PEP 484

## 0.6.3

- Update requirements for discord.py 2.2.2

## 0.6.2

This is the version for discord.py 2.2.0

- Embed equality check now checks for equality of fields.
- Fix members factories to add the "flags" key (necessary in 2.2.0)

## 0.6.1

- Linting

## 0.6.0

- First version for working with dpytest>=2.X.X
    Changes have been made in backend, factories, websocket
- Change the README
- Change the setup.py for python >= 3.8
- Changing in doc

## 0.5.3

- Docs: Add vertical spacing for functions & methods
- Fix behaviour 'discord.Role.edit' with hoist, mentionable, etc.

## 0.5.2

- Get member mentions by using the user ID in mention

## 0.5.1

- NEW methods : Pins, get_user, & clear_reactions
- fix utils functions imports

## 0.5.0

- Remove the runner verification methods, replace them with verification builders

## 0.4.0

- Rename simulate_reaction -> add_reaction and make it take a user to react as

## 0.3.0

- unrealease (error when bumping version)

## 0.2.0

- Merge hint files into .py files
- Use typing export of Pattern

## 0.1.1

- Add content type to attachments
- Overwrite _guild_needs_chunking (fix for asyncio wait_for errors)

## 0.1.0

- Bump version (sould have done that with 0.0.23, since many changes have been commited)
- Bug fix with role_mentions=None being not iterable.

## 0.0.23

- Support for discord.py 1.7.1
- Attachments allowed on messages
- verify_embed without test fixed
- Add members intent
- Added more testing

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "dpytest",
    "maintainer": "CraftSpider, Sergeileduc",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "discord,discord.py,test",
    "author": "",
    "author_email": "Rune Tynan <runetynan@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/7c/4f/d04bb7cd18acc6c4a626eb624f443c33c4e9c1727d2261dd7af47c1daea4/dpytest-0.7.0.tar.gz",
    "platform": null,
    "description": "# dpytest\r\n\r\n[![Test CI](https://github.com/CraftSpider/dpytest/actions/workflows/test-ci.yml/badge.svg)](https://github.com/CraftSpider/dpytest/actions/workflows/test-ci.yml)\r\n[![Lint](https://github.com/CraftSpider/dpytest/actions/workflows/lint-ci.yml/badge.svg)](https://github.com/CraftSpider/dpytest/actions/workflows/lint-ci.yml)\r\n[![Documentation Status](https://readthedocs.org/projects/dpytest/badge/?version=latest)](https://dpytest.readthedocs.io/en/latest/?badge=latest)\r\n[![Discord Server](https://img.shields.io/discord/523301176309972993.svg?label=Support%20Discord)](https://discord.gg/aNe8DqAuxd)\r\n\r\nThis is a package to allow testing of discord.py.\r\nIt is only compatible with the rewrite version, and is still in alpha.\r\nIf using pytest, it is suggested to use pytest-asyncio for test running, otherwise the user will need\r\nto provide their own async test runner.\r\n\r\n## Notice\r\n\r\nFor discord.py 1.7.X, use `dpytest 0.5.3`\r\n\r\nFor discord.py 2.X.X, use `dpytest>=0.6`\r\n\r\n## Documentation\r\n\r\nDocumentation can be found at [dpytest.readthedocs.io](https://dpytest.readthedocs.io/en/latest/), including examples and tutorials\r\n\r\n# History\r\n\r\n## 0.7.0\r\n\r\n\u26a0\ufe0f Warning \u26a0\ufe0f:\r\n\r\nThis can be **breaking** :\r\n\r\nThe `configure` function has changed.\r\nIt nows accepts either an `int` (like in the previous version) OR a `list` of `string` for the parameters `guilds`, `text_channels`, `voice_channels` and `members`.\r\nBut the names of the parameters had to be changed.\r\n\r\n`num_guilds`, `num_text_channels`, `num_voice_channels`, `num_members` are DERECATED.\r\n\r\nExample:\r\n\r\n```python\r\n    dpytest.configure(bot,\r\n                      guilds=[\"CoolGuild\", \"LameGuild\"],\r\n                      text_channels=[\"Fruits\", \"Videogames\"],\r\n                      voice_channels=2,\r\n                      members=[\"Joe\", \"Jack\", \"William\", \"Averell\"])\r\n```\r\n\r\nOther changes:\r\n\r\n- fixes in typing\r\n- add `content_type` to `dict_from_attachment()`\r\n\r\n## 0.6.8\r\n\r\nTest agains discord.py 2.3\r\n\r\n## 0.6.7\r\n\r\nFix bug in channel_history\r\n\r\nFix issue #111\r\n\r\n## 0.6.6\r\n\r\nSupport asyncio tasks that have no \\_\\_name\\_\\_\r\n\r\n## 0.6.5\r\n\r\nThis release allows testing with Voice Channels.\r\n\r\nNew :\r\n\r\n- `FakeVoiceChannel` and `FakeVoiceClient` classes implemetation\r\n- New tests\r\n\r\nChanges :\r\n\r\n- `create_channel` method can create voice channel\r\n\r\n\u26a0\ufe0f Warning \u26a0\ufe0f:\r\n\r\nThis can be **breaking** :\r\n\r\nthe `configure()` function DOESN'T take the keyword parameter `num_channels` anymore, but instead :\r\n`num_text_channels` and `num_voice_channels`\r\n\r\n## 0.6.4\r\n\r\n- Fix: edit message doesn't update message queue\r\n- Refactor **init**.py import to be explicit exports as per PEP 484\r\n\r\n## 0.6.3\r\n\r\n- Update requirements for discord.py 2.2.2\r\n\r\n## 0.6.2\r\n\r\nThis is the version for discord.py 2.2.0\r\n\r\n- Embed equality check now checks for equality of fields.\r\n- Fix members factories to add the \"flags\" key (necessary in 2.2.0)\r\n\r\n## 0.6.1\r\n\r\n- Linting\r\n\r\n## 0.6.0\r\n\r\n- First version for working with dpytest>=2.X.X\r\n    Changes have been made in backend, factories, websocket\r\n- Change the README\r\n- Change the setup.py for python >= 3.8\r\n- Changing in doc\r\n\r\n## 0.5.3\r\n\r\n- Docs: Add vertical spacing for functions & methods\r\n- Fix behaviour 'discord.Role.edit' with hoist, mentionable, etc.\r\n\r\n## 0.5.2\r\n\r\n- Get member mentions by using the user ID in mention\r\n\r\n## 0.5.1\r\n\r\n- NEW methods : Pins, get_user, & clear_reactions\r\n- fix utils functions imports\r\n\r\n## 0.5.0\r\n\r\n- Remove the runner verification methods, replace them with verification builders\r\n\r\n## 0.4.0\r\n\r\n- Rename simulate_reaction -> add_reaction and make it take a user to react as\r\n\r\n## 0.3.0\r\n\r\n- unrealease (error when bumping version)\r\n\r\n## 0.2.0\r\n\r\n- Merge hint files into .py files\r\n- Use typing export of Pattern\r\n\r\n## 0.1.1\r\n\r\n- Add content type to attachments\r\n- Overwrite _guild_needs_chunking (fix for asyncio wait_for errors)\r\n\r\n## 0.1.0\r\n\r\n- Bump version (sould have done that with 0.0.23, since many changes have been commited)\r\n- Bug fix with role_mentions=None being not iterable.\r\n\r\n## 0.0.23\r\n\r\n- Support for discord.py 1.7.1\r\n- Attachments allowed on messages\r\n- verify_embed without test fixed\r\n- Add members intent\r\n- Added more testing\r\n",
    "bugtrack_url": null,
    "license": "The MIT License (MIT)  Copyright (c) 2018-2019 CraftSpider  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
    "summary": "A package that assists in writing tests for discord.py",
    "version": "0.7.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/CraftSpider/dpytest/issues",
        "Documentation": "https://dpytest.readthedocs.io/",
        "Homepage": "https://github.com/CraftSpider/dpytest",
        "Source": "https://github.com/CraftSpider/dpytest"
    },
    "split_keywords": [
        "discord",
        "discord.py",
        "test"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c7b3172293411e30a0c255e4c86914e71ce3338844c43f90d36eb8c7d13967bf",
                "md5": "165cfef0a12752978984aa5aac0c715c",
                "sha256": "b9febeb860e6bc05bac3d433882becdba1b965ff4db1667e2d629acbc868b0d2"
            },
            "downloads": -1,
            "filename": "dpytest-0.7.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "165cfef0a12752978984aa5aac0c715c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 30344,
            "upload_time": "2023-06-19T15:42:55",
            "upload_time_iso_8601": "2023-06-19T15:42:55.391043Z",
            "url": "https://files.pythonhosted.org/packages/c7/b3/172293411e30a0c255e4c86914e71ce3338844c43f90d36eb8c7d13967bf/dpytest-0.7.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7c4fd04bb7cd18acc6c4a626eb624f443c33c4e9c1727d2261dd7af47c1daea4",
                "md5": "1e93ea349603573b2133baac1ef3372d",
                "sha256": "9f16d58347591756a8d662a44c2307864698c8a5656408a584d0bb5d69c83bbb"
            },
            "downloads": -1,
            "filename": "dpytest-0.7.0.tar.gz",
            "has_sig": false,
            "md5_digest": "1e93ea349603573b2133baac1ef3372d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 85233,
            "upload_time": "2023-06-19T15:42:57",
            "upload_time_iso_8601": "2023-06-19T15:42:57.002423Z",
            "url": "https://files.pythonhosted.org/packages/7c/4f/d04bb7cd18acc6c4a626eb624f443c33c4e9c1727d2261dd7af47c1daea4/dpytest-0.7.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-19 15:42:57",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "CraftSpider",
    "github_project": "dpytest",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": true,
    "lcname": "dpytest"
}
        
Elapsed time: 0.07805s