Skip to main content

Show surprise when tests are passing

Project description

pytest-porcochu

Like pytest-pikachu but it's a pikachuified pig.

pytest-porcochu prints ascii art of Surprised Porco when all tests pass.

Installation

$ pip install pytest-porcochu

Usage

Pass the --porcochu option to pytest as a command line flag or configuration file option to get these stunning effects.

$ pytest --porcochu
============================= test session starts ==============================
platform linux -- Python 3.9.6, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
rootdir: /home/.../pytest-porcochu, configfile: tox.ini, testpaths: tests
plugins: porcochu-0.1.0
collected 4 items

tests/test_plugin.py ....                                                [100%]

============================== 4 passed in 0.11s ===============================

%%%%@%%%%%%%%%@%%%%%%%#########%%%#%%######################%@%%##*+===---=-::::
%%%%@%%%@%%%%%@%%%%########################################%@%###*+==-::-=-.:::
@@%@@%%%@@%%%%@@%%%######%##########%################*###**#@%*=--==--::--:::-:
%%@%%%%%@%#----::::-=**#####%%%%%#%%##################*+:----==---==---:--:..::
%%@%%%%%%%%=--=========-:+##%%%############*#######+:--=======---+=---::-:. .::
%@@%%%%%%%%%=---==========:.+#%%###############*=:.:-=======----=+=---::-:. .::
%@@%%%%%%%%%*------==+++++=:...-=+=:.    .:--:...::-======--::::+==---::-:. .::
%%%%%%%%%%%%%-:::::--==+++==-.                  .::-===----:-::-+=---:::--:..::
@@%@%%%%@@@@%*-:-::--==+==++-.                   .-===----:::::++==---::--:.:-:
@@@@@@@@@@@@%%+--:::---===+=:..                  .-=--=-:::::-+++===--===++=+**
@@@@@@@@@@@@%@%*--:::::--:--::::...           ....::::::::::=#%#%%####%%%%%%%%%
@@@@@@@@@@@@+==+%+----:::::--::-=::...       ..#::--:::::-=*%%%%%%%%%%%%%%%%%%%
@@@@@@@@@%-:===#%%%*=--::-=:-.:-:::.....     .:...-#*---*#@@@@@@@@@@@@@@@@@@@@@
------=+=::-==+#%@@%%#++++:--.:::....:..       ...:-@%##%@@@@@@@@@@@@#*%@@@@@@@
-:::-==---=+===#@%%%%%%%#:--:.:::....:...   .   ...:=%%%%%%%%%%%%%%%%%#%%%%%%%%
:::::---===++==#@@@@@%%%:---::::.....:..::::.  ....::%%%%%%%%%%%%%%%%%%%%%%%%%%
:::::--:-=++==+%@@@@@@%%:--::::::::.:.:--:::-:...:.::##%%%%%%%%%%%%%%%%%%%%%%%%
::::--:-+*+#*+#%%@@@@@@--::::::::::::=+#----#+-:.:.::-###%%%%%%%%%%%%@%@@@%%%%%
-:::---=*%*%@@%%@@@@@@%--:::::::-:--=-:-====-:::::::::%%%###%%%%%%%%%##%%%@@@@%
=-::--=++**%@@@@@@@@@@*--::::--------==+++++==-:::::::#@%@@%%%%#***********##%#
:-::--=+++*%@@@@@@@@@@*-----::--------=+====---:::::::=@@@@@%%#****************
::-:::==+*#@@@@@@@@@@@=---------=====----------::--::::%@@@@%******************
---:---=+*%@@@@@@@@@@@#----=+========+========++=--:::-+@@@%#******#***********
----:--=+*%@@@@@@@@@@@@---:-=*#+++==+====++*#*=-:::::---%@@%#*******#**********
==--+++++*#@@@@@@@@@@@@#--::--+##*+++=++****+=-:::::-=--=@@##******#***********
#++++==++**%@@%%%%@@@@@=--::::-+*##********==-:::::--==--#@%#**++**************
===+++****+==-------:---=--::::-***+******+=---::::=+++++==+==========+********
++++****+++++====++=++====-:::::+*+++=++++=-----:-+++==+==-----=-------====----

Prior art

I wrote this pytest plugin after seeing this Reddit thread. I used the answer in this Stack Overflow question on how to pass information between different pytest hooks.

License

Distributed under the terms of the MIT license, pytest-porcochu is free and open source software.

Project details


Download files

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

Source Distribution

pytest-porcochu-1.0.0.tar.gz (4.7 kB view details)

Uploaded Source

File details

Details for the file pytest-porcochu-1.0.0.tar.gz.

File metadata

  • Download URL: pytest-porcochu-1.0.0.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.2

File hashes

Hashes for pytest-porcochu-1.0.0.tar.gz
Algorithm Hash digest
SHA256 df5b5f7551821eba76b6df8f03805cb7fb959ae95e8fa662f469489a3c48d5bb
MD5 8e025fb9cbcf8efba1c03b86d07daab4
BLAKE2b-256 ec36b02909694b6515c0ef5c55b572dea1cab74981adf7c26bf093e27d1b8dfc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page