Skip to main content

dpytest

Test CI Lint Documentation Status Discord Server

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, 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:

    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

Metadata

Release files for dpytest 0.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dpytest 0.7.0
File Size Uploaded
dpytest-0.7.0.tar.gz 85.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dpytest 0.7.0
File Interpreter ABI Platform
dpytest-0.7.0-py3-none-any.whl Python 3 none any Details

Total release size: 115.6 kB

Release files / dpytest-0.7.0.tar.gz

Download URL dpytest-0.7.0.tar.gz
Size 85.2 kB
Tags Source
SHA-256 checksum
How to use checksums
9f16d58347591756a8d662a44c2307864698c8a5656408a584d0bb5d69c83bbb
BLAKE2b-256 checksum
How to use checksums
7c4fd04bb7cd18acc6c4a626eb624f443c33c4e9c1727d2261dd7af47c1daea4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.8

Release files / dpytest-0.7.0-py3-none-any.whl

Download URL dpytest-0.7.0-py3-none-any.whl
Size 30.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b9febeb860e6bc05bac3d433882becdba1b965ff4db1667e2d629acbc868b0d2
BLAKE2b-256 checksum
How to use checksums
c7b3172293411e30a0c255e4c86914e71ce3338844c43f90d36eb8c7d13967bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.8

Release history Release notifications | RSS feed

This release

0.7.0 This release

2 release files

0.6.8

2 release files

0.6.7

2 release files

0.6.6

2 release files

0.6.5

2 release files

0.6.4

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.23

2 release files

0.0.21

2 release files

0.0.20

2 release files

0.0.19

2 release files

0.0.18

2 release files

0.0.17

2 release files

0.0.16

2 release files

0.0.15

2 release files

0.0.14

2 release files

0.0.13

2 release files

0.0.12

3 release files

0.0.11

3 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page