Skip to main content

dpytest

This is a package to allow testing of discord.py. It is only compatible with the rewrite version, and is still in early alpha.

Usage

dpytest can be used for projects using the default commands.Bot, or those defining their own subclass of bot. For someone using a custom class, code would look something like this:

import discord.ext.test as dpytest
import yourbot


def test_bot():
    bot = yourbot.BotClass()

    # Load any extensions/cogs you want to in here

    dpytest.configure(bot)

    dpytest.message("!help")
    dpytest.verify_message("[Expected help output]")

The dpytest framework is designed to be used best with pytest style fixtures, but is technically framework agnostic.
With pytest, the bot setup step would be moved into a fixture so each test could use that fixture. Configure will ensure that all state is reset after each call.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dpytest-0.0.12.tar.gz (8.8 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

dpytest-0.0.12-py3.7.egg (20.8 kB view details)

Uploaded Egg

dpytest-0.0.12-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

Details for the file dpytest-0.0.12.tar.gz.

File metadata

  • Download URL: dpytest-0.0.12.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.7

File hashes

Hashes for dpytest-0.0.12.tar.gz
Algorithm Hash digest
SHA256 9c95cef22df830b98cb02317817f18ce16299d673dcf93d40cea2afd34ffbf75
MD5 a63f0da687f8c111e40144b378a8a9d3
BLAKE2b-256 b3d7227743b2f04f71ffbc5fffa5f06dc61ab2b9ab2e12931a61e50c71010acd

See more details on using hashes here.

File details

Details for the file dpytest-0.0.12-py3.7.egg.

File metadata

  • Download URL: dpytest-0.0.12-py3.7.egg
  • Upload date:
  • Size: 20.8 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

File hashes

Hashes for dpytest-0.0.12-py3.7.egg
Algorithm Hash digest
SHA256 0465332c65557da9750ce173019d2362dc8daacc757298c0c32037e883640fd5
MD5 e8151366fde7746cbe89fa064767a089
BLAKE2b-256 fa2cdcbc525a39dc38a2d2772684d23a2c328df7471b795d8d415db1f46deb7e

See more details on using hashes here.

File details

Details for the file dpytest-0.0.12-py3-none-any.whl.

File metadata

  • Download URL: dpytest-0.0.12-py3-none-any.whl
  • Upload date:
  • Size: 10.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.7

File hashes

Hashes for dpytest-0.0.12-py3-none-any.whl
Algorithm Hash digest
SHA256 4db1ecdbf856003858995d20736900a8c5d950c0de9419e52dc031e9b1660e2c
MD5 062be6d70c509321c781e226a8eaeb00
BLAKE2b-256 fc57aa0855fb77db0d0b888a62aa92bd72c6ae9568db00febca73ee8f1721f9b

See more details on using hashes here.

Release history Release notifications | RSS feed

0.7.0

2 files

0.6.8

2 files

0.6.7

2 files

0.6.6

2 files

0.6.5

2 files

0.6.4

2 files

0.6.3

2 files

0.6.2

2 files

0.6.1

2 files

0.6.0

2 files

0.5.3

2 files

0.5.2

2 files

0.5.1

2 files

0.5.0

2 files

0.4.0

2 files

0.2.0

2 files

0.1.1

2 files

0.1.0

2 files

0.0.23

2 files

0.0.22

2 files

0.0.21

2 files

0.0.20

2 files

0.0.19

2 files

0.0.18

2 files

0.0.17

2 files

0.0.16

2 files

0.0.15

2 files

0.0.14

2 files

0.0.13

2 files

This release

0.0.12 This release

3 files

0.0.11

3 files

0.0.10

2 files

0.0.9

2 files

0.0.8

2 files

0.0.7

2 files

0.0.6

2 files

0.0.5

2 files

0.0.4

2 files

0.0.3

2 files

0.0.2

2 files

0.0.1

1 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