Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

Try pytest-xdist for parallelization in tests (#1556)

Naveen M K9554b734d29e
diff --git a/poetry.lock b/poetry.lock
index 0107033f2..59626dd3b 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -24,6 +24,14 @@ doc = ["sphinx-rtd-theme", "sphinx-autodoc-typehints (>=1.2.0)"]
test = ["coverage[toml] (>=4.5)", "hypothesis (>=4.0)", "pytest (>=6.0)", "pytest-mock (>=3.6.1)", "trustme", "uvloop (<0.15)", "mock (>=4)", "uvloop (>=0.15)"]
trio = ["trio (>=0.16)"]
+[[package]]
+name = "apipkg"
+version = "1.5"
+description = "apipkg: namespace control and lazy-import mechanism"
+category = "dev"
+optional = false
+python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
+
[[package]]
name = "appdirs"
version = "1.4.4"
@@ -331,6 +339,20 @@ category = "main"
optional = true
python-versions = ">=2.7"
+[[package]]
+name = "execnet"
+version = "1.8.0"
+description = "execnet: rapid multi-Python deployment"
+category = "dev"
+optional = false
+python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
+
+[package.dependencies]
+apipkg = ">=1.4"
+
+[package.extras]
+testing = ["pre-commit"]
+
[[package]]
name = "filelock"
version = "3.0.12"
@@ -428,7 +450,7 @@ protobuf = ">=3.5.0.post1,<4.0dev"
[[package]]
name = "identify"
-version = "2.2.5"
+version = "2.2.6"
description = "File identification library for Python"
category = "dev"
optional = false
@@ -1140,7 +1162,7 @@ wcwidth = "*"
[[package]]
name = "protobuf"
-version = "3.17.0"
+version = "3.17.1"
description = "Protocol Buffers"
category = "main"
optional = true
@@ -1149,6 +1171,17 @@ python-versions = "*"
[package.dependencies]
six = ">=1.9"
+[[package]]
+name = "psutil"
+version = "5.8.0"
+description = "Cross-platform lib for process and system monitoring in Python."
+category = "dev"
+optional = false
+python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
+
+[package.extras]
+test = ["ipaddress", "mock", "unittest2", "enum34", "pywin32", "wmi"]
+
[[package]]
name = "ptyprocess"
version = "0.7.0"
@@ -1348,6 +1381,35 @@ pytest = ">=4.6"
[package.extras]
testing = ["fields", "hunter", "process-tests (==2.0.2)", "six", "pytest-xdist", "virtualenv"]
+[[package]]
+name = "pytest-forked"
+version = "1.3.0"
+description = "run tests in isolated forked subprocesses"
+category = "dev"
+optional = false
+python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
+
+[package.dependencies]
+py = "*"
+pytest = ">=3.10"
+
+[[package]]
+name = "pytest-xdist"
+version = "2.2.1"
+description = "pytest xdist plugin for distributed testing and loop-on-failing modes"
+category = "dev"
+optional = false
+python-versions = ">=3.5"
+
+[package.dependencies]
+execnet = ">=1.1"
+pytest = ">=6.0.0"
+pytest-forked = "*"
+
+[package.extras]
+psutil = ["psutil (>=3.0)"]
+testing = ["filelock"]
+
[[package]]
name = "python-dateutil"
version = "2.8.1"
@@ -1684,7 +1746,7 @@ python-versions = ">= 3.5"
[[package]]
name = "tqdm"
-version = "4.60.0"
+version = "4.61.0"
description = "Fast, Extensible Progress Meter"
category = "main"
optional = false
@@ -1727,7 +1789,7 @@ python-versions = "*"
[[package]]
name = "virtualenv"
-version = "20.4.6"
+version = "20.4.7"
description = "Virtual Python Environment builder"
category = "dev"
optional = false
@@ -1806,7 +1868,7 @@ webgl_renderer = ["grpcio", "grpcio-tools"]
[metadata]
lock-version = "1.1"
python-versions = "^3.7"
-content-hash = "bf1f9f46f86f3f007549e369421f2414d20e0ee26c479f4f6b5008b07a08aa9d"
+content-hash = "822ae0aa5e75ee2cae05ead477c37d16e9cbf8ffb5481db62ff9171970f06b22"
[metadata.files]
alabaster = [
@@ -1817,6 +1879,10 @@ anyio = [
{file = "anyio-3.1.0-py3-none-any.whl", hash = "sha256:5e335cef65fbd1a422bbfbb4722e8e9a9fadbd8c06d5afe9cd614d12023f6e5a"},
{file = "anyio-3.1.0.tar.gz", hash = "sha256:43e20711a9d003d858d694c12356dc44ab82c03ccc5290313c3392fa349dad0e"},
]
+apipkg = [
+ {file = "apipkg-1.5-py2.py3-none-any.whl", hash = "sha256:58587dd4dc3daefad0487f6d9ae32b4542b185e1c36db6993290e7c41ca2b47c"},
+ {file = "apipkg-1.5.tar.gz", hash = "sha256:37228cda29411948b422fae072f57e31d3396d2ee1c9783775980ee9c9990af6"},
+]
appdirs = [
{file = "appdirs-1.4.4-py2.py3-none-any.whl", hash = "sha256:a841dacd6b99318a741b166adb07e19ee71a274450e68237b4650ca1055ab128"},
{file = "appdirs-1.4.4.tar.gz", hash = "sha256:7d5d0167b2b1ba821647616af46a749d1c653740dd0d2415100fe26e27afdf41"},
@@ -2045,6 +2111,10 @@ entrypoints = [
{file = "entrypoints-0.3-py2.py3-none-any.whl", hash = "sha256:589f874b313739ad35be6e0cd7efde2a4e9b6fea91edcc34e58ecbb8dbe56d19"},
{file = "entrypoints-0.3.tar.gz", hash = "sha256:c70dd71abe5a8c85e55e12c19bd91ccfeec11a6e99044204511f9ed547d48451"},
]
+execnet = [
+ {file = "execnet-1.8.0-py2.py3-none-any.whl", hash = "sha256:7a13113028b1e1cc4c6492b28098b3c6576c9dccc7973bfe47b342afadafb2ac"},
+ {file = "execnet-1.8.0.tar.gz", hash = "sha256:b73c5565e517f24b62dea8a5ceac178c661c4309d3aa0c3e420856c072c411b4"},
+]
filelock = [
{file = "filelock-3.0.12-py3-none-any.whl", hash = "sha256:929b7d63ec5b7d6b71b0fa5ac14e030b3f70b75747cef1b10da9b879fef15836"},
{file = "filelock-3.0.12.tar.gz", hash = "sha256:18d82244ee114f543149c66a6e0c14e9c4f8a1044b5cdaadd0f82159d6a6ff59"},
@@ -2188,8 +2258,8 @@ grpcio-tools = [
{file = "grpcio_tools-1.33.2-cp39-cp39-win_amd64.whl", hash = "sha256:b68ce929acb8c392b83c49257e18f03d73ca3af408bfd5f7e78fe351c384c008"},
]
identify = [
- {file = "identify-2.2.5-py2.py3-none-any.whl", hash = "sha256:9c3ab58543c03bd794a1735e4552ef6dec49ec32053278130d525f0982447d47"},
- {file = "identify-2.2.5.tar.gz", hash = "sha256:bc1705694253763a3160b943316867792ec00ba7a0ee40b46e20aebaf4e0c46a"},
+ {file = "identify-2.2.6-py2.py3-none-any.whl", hash = "sha256:1560bb645b93d5c05c3535c72a4f4884133006423d02c692ac6862a45eb0d521"},
+ {file = "identify-2.2.6.tar.gz", hash = "sha256:01ebbc7af37043806216c7550539210cde4f82451983eb8735a02b3b9d013e40"},
]
idna = [
{file = "idna-3.1-py3-none-any.whl", hash = "sha256:5205d03e7bcbb919cc9c19885f9920d622ca52448306f2377daede5cf3faac16"},
@@ -2619,29 +2689,59 @@ prompt-toolkit = [
{file = "prompt_toolkit-3.0.18.tar.gz", hash = "sha256:e1b4f11b9336a28fa11810bc623c357420f69dfdb6d2dac41ca2c21a55c033bc"},
]
protobuf = [
- {file = "protobuf-3.17.0-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:15351df904347da2081a2eebc42b192c29724eb57dbe56dae440be843f1e4779"},
- {file = "protobuf-3.17.0-cp27-cp27mu-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:5356981c1919782b8c2e3ea5c5d85ad5937b8178a025ac9edc2f2ca5b4a717ae"},
- {file = "protobuf-3.17.0-cp35-cp35m-macosx_10_9_intel.whl", hash = "sha256:eac0a2a7ea99e17175f6e7b53cdc9004ed786c072fbdf933def0e454e14fd323"},
- {file = "protobuf-3.17.0-cp35-cp35m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:4c8d0997fdc0a4cf9de7950d598ce6974b22e8618bbcf1d15e9842010cf8420a"},
- {file = "protobuf-3.17.0-cp35-cp35m-win32.whl", hash = "sha256:9ae321459d4890c3939c536382f75e232c9e91ce506310353c8a15ad5c379e0d"},
- {file = "protobuf-3.17.0-cp35-cp35m-win_amd64.whl", hash = "sha256:295944ef0772498d7bf75f6aa5d4dfcfd02f5ce70f735b406e52e43ac3914d38"},
- {file = "protobuf-3.17.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:850f429bd2399525d339d05bc809f090f16d3d88737bed637d355a5ee8d3b81a"},
- {file = "protobuf-3.17.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:809a96d5a1a74538728710f9104f43ae77f5e48bde274ee321b10a324ba52e4f"},
- {file = "protobuf-3.17.0-cp36-cp36m-win32.whl", hash = "sha256:8a3ac375539055164f31a330770f137875307e6f04c21e2647f2e7139c501295"},
- {file = "protobuf-3.17.0-cp36-cp36m-win_amd64.whl", hash = "sha256:3d338910b10b88b18581cf6877b3938b2e262e8fdc2c1057f5a291787de63183"},
- {file = "protobuf-3.17.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:1488f786bd1912f97796cf5def8cacf433735616896cf7ed9dc786cee693dfc8"},
- {file = "protobuf-3.17.0-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:bcaff977db178f0bfde10bab0d23a5f5adf5964adba70c315e45922a1c55eb90"},
- {file = "protobuf-3.17.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:939ce06846ddfec99c0bff510510b3ee45778e7a3aec6544d1f36526e5fecb67"},
- {file = "protobuf-3.17.0-cp37-cp37m-win32.whl", hash = "sha256:3237acce5b666c7b0f45785cc2d0809796d4df3593bd68338aebf25408139188"},
- {file = "protobuf-3.17.0-cp37-cp37m-win_amd64.whl", hash = "sha256:2f77afe33bb86c7d34221a86193256d69aa10818620fe4a7513d98211d67d672"},
- {file = "protobuf-3.17.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:acc9f2091ace3de429eee424ab7ba0bc52a6aa9ffc9909e5c4de259a3f71db46"},
- {file = "protobuf-3.17.0-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:a29631f4f8bcf79b12a59e83d238d888de5034871461d788c74c68218ad75049"},
- {file = "protobuf-3.17.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:05c304396e309661c45e3a97bd2d8da1fc2bab743ed2ca880bcb757271c40c0e"},
- {file = "protobuf-3.17.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:baea44967071e6a51e705e4e88aebf35f530a14004cc69f60a185e5d7e13de7e"},
- {file = "protobuf-3.17.0-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:3b5c461af5a3cebd796c73370db929b7e24cbaba655eefdc044226bc8a843d6b"},
- {file = "protobuf-3.17.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:44399393c3a8cc04a4cfbdc721dd7f2114497efda582e946a91b8c4290ae5ff5"},
- {file = "protobuf-3.17.0-py2.py3-none-any.whl", hash = "sha256:e32ef0c9f4b548c80d94dfff8b4130ca2ff3d50caaf2455889e3f5b8a01e8038"},
- {file = "protobuf-3.17.0.tar.gz", hash = "sha256:05dfe9319939a8473c21b469f34f6486646e54fb8542637cf7ed8e2fbfe21538"},
+ {file = "protobuf-3.17.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:6e48c9b26d8e262331c79b208c4bf6b499a71912b1213d77b63c5ca248fc2a4e"},
+ {file = "protobuf-3.17.1-cp27-cp27mu-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:d06ef0f7873e04e2d1a2bfa0701d063e4dde5242b2946c6f071a442e4cb3be0b"},
+ {file = "protobuf-3.17.1-cp35-cp35m-macosx_10_9_intel.whl", hash = "sha256:437d4681160ac5310457c4dc8ab973ec56769a236c479393c53fa71a26dfb38f"},
+ {file = "protobuf-3.17.1-cp35-cp35m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:4ef4865ee740d5b45adfc96481adf1fcbfbb454bd51b86f4c4a5065262d0b08b"},
+ {file = "protobuf-3.17.1-cp35-cp35m-win32.whl", hash = "sha256:5057744a363d65d2780dc01fa751bb14e860c507b2598b22af241aabb28a0ae9"},
+ {file = "protobuf-3.17.1-cp35-cp35m-win_amd64.whl", hash = "sha256:94be4d5c2ba372ff159b2cc804d274acbaa7ebf361966f5619f99880c7c09a3c"},
+ {file = "protobuf-3.17.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:fea786428b34385b073ef619d896282889b432b87dc043c0b815c72d35d64025"},
+ {file = "protobuf-3.17.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:2c6ad26f079301bcf9f1b5d5b4b2dbac0e2e7c0111c6fbecf94f558952c78ee0"},
+ {file = "protobuf-3.17.1-cp36-cp36m-win32.whl", hash = "sha256:ad17d3dd80f3377fc70a9dd677ec51231a892f9f65783cf7d2d24ee381f0feca"},
+ {file = "protobuf-3.17.1-cp36-cp36m-win_amd64.whl", hash = "sha256:0f237c1e84e46747397a3e8173edb3116e81163b2878fc944a5193b05876eaee"},
+ {file = "protobuf-3.17.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:c1631570af7aae611f1cd7c6918fe4a7154507169ef30e8c5f380eba36ee2659"},
+ {file = "protobuf-3.17.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:8a509097ba25452c9b44198843b0df67f921bd36f37adcbcfaaf6ee5cbe09132"},
+ {file = "protobuf-3.17.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:cbd132f0aa7180f099d3c47fecfbcdca1590ef3b7da8346146192ba580c9b24e"},
+ {file = "protobuf-3.17.1-cp37-cp37m-win32.whl", hash = "sha256:762faa8873d0569466cf66128bdbadd5e500600bdf2f87cf039493ed9d2725b6"},
+ {file = "protobuf-3.17.1-cp37-cp37m-win_amd64.whl", hash = "sha256:27c7c933b838a0837eb1f429e7994310ee8577a7b69abc38e84d5db97a2650a2"},
+ {file = "protobuf-3.17.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1fcace96670b8512e805d6e275bd59b860967a7648e05cfad35ec1e7c03d7262"},
+ {file = "protobuf-3.17.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:2a88be54fce118d69f083b847554afd1852053c0869bdac396678ec9ec6a94d5"},
+ {file = "protobuf-3.17.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:ad8cdbc594c886483970ac274b5af98483b272e873b7c5dac60aa3a7222301b3"},
+ {file = "protobuf-3.17.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:b92f95994ff27a6992ea2cf3f369476ad0065986eb00252b760d0bc55c5454a8"},
+ {file = "protobuf-3.17.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:40bf764b63f06a816b1c079f7718184fdd8dbfd9dad3cd1a446382492ca00b3e"},
+ {file = "protobuf-3.17.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:a15898d88307dba0363767b30960396a2dec74b8ffe7bcb4e885312a569eda3f"},
+ {file = "protobuf-3.17.1-py2.py3-none-any.whl", hash = "sha256:36d306dda3c159a5fe0025ba0e9728aac00dd69523dd12ee3fb7b1717cd80e7d"},
+ {file = "protobuf-3.17.1.tar.gz", hash = "sha256:25bc4f1c23aced9b3a9e70eef7f03e63bcbd6cfbd881a91b5688412dce8992e1"},
+]
+psutil = [
+ {file = "psutil-5.8.0-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:0066a82f7b1b37d334e68697faba68e5ad5e858279fd6351c8ca6024e8d6ba64"},
+ {file = "psutil-5.8.0-cp27-cp27m-manylinux2010_i686.whl", hash = "sha256:0ae6f386d8d297177fd288be6e8d1afc05966878704dad9847719650e44fc49c"},
+ {file = "psutil-5.8.0-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:12d844996d6c2b1d3881cfa6fa201fd635971869a9da945cf6756105af73d2df"},
+ {file = "psutil-5.8.0-cp27-cp27mu-manylinux2010_i686.whl", hash = "sha256:02b8292609b1f7fcb34173b25e48d0da8667bc85f81d7476584d889c6e0f2131"},
+ {file = "psutil-5.8.0-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:6ffe81843131ee0ffa02c317186ed1e759a145267d54fdef1bc4ea5f5931ab60"},
+ {file = "psutil-5.8.0-cp27-none-win32.whl", hash = "sha256:ea313bb02e5e25224e518e4352af4bf5e062755160f77e4b1767dd5ccb65f876"},
+ {file = "psutil-5.8.0-cp27-none-win_amd64.whl", hash = "sha256:5da29e394bdedd9144c7331192e20c1f79283fb03b06e6abd3a8ae45ffecee65"},
+ {file = "psutil-5.8.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:74fb2557d1430fff18ff0d72613c5ca30c45cdbfcddd6a5773e9fc1fe9364be8"},
+ {file = "psutil-5.8.0-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:74f2d0be88db96ada78756cb3a3e1b107ce8ab79f65aa885f76d7664e56928f6"},
+ {file = "psutil-5.8.0-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:99de3e8739258b3c3e8669cb9757c9a861b2a25ad0955f8e53ac662d66de61ac"},
+ {file = "psutil-5.8.0-cp36-cp36m-win32.whl", hash = "sha256:36b3b6c9e2a34b7d7fbae330a85bf72c30b1c827a4366a07443fc4b6270449e2"},
+ {file = "psutil-5.8.0-cp36-cp36m-win_amd64.whl", hash = "sha256:52de075468cd394ac98c66f9ca33b2f54ae1d9bff1ef6b67a212ee8f639ec06d"},
+ {file = "psutil-5.8.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:c6a5fd10ce6b6344e616cf01cc5b849fa8103fbb5ba507b6b2dee4c11e84c935"},
+ {file = "psutil-5.8.0-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:61f05864b42fedc0771d6d8e49c35f07efd209ade09a5afe6a5059e7bb7bf83d"},
+ {file = "psutil-5.8.0-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:0dd4465a039d343925cdc29023bb6960ccf4e74a65ad53e768403746a9207023"},
+ {file = "psutil-5.8.0-cp37-cp37m-win32.whl", hash = "sha256:1bff0d07e76114ec24ee32e7f7f8d0c4b0514b3fae93e3d2aaafd65d22502394"},
+ {file = "psutil-5.8.0-cp37-cp37m-win_amd64.whl", hash = "sha256:fcc01e900c1d7bee2a37e5d6e4f9194760a93597c97fee89c4ae51701de03563"},
+ {file = "psutil-5.8.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:6223d07a1ae93f86451d0198a0c361032c4c93ebd4bf6d25e2fb3edfad9571ef"},
+ {file = "psutil-5.8.0-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:d225cd8319aa1d3c85bf195c4e07d17d3cd68636b8fc97e6cf198f782f99af28"},
+ {file = "psutil-5.8.0-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:28ff7c95293ae74bf1ca1a79e8805fcde005c18a122ca983abf676ea3466362b"},
+ {file = "psutil-5.8.0-cp38-cp38-win32.whl", hash = "sha256:ce8b867423291cb65cfc6d9c4955ee9bfc1e21fe03bb50e177f2b957f1c2469d"},
+ {file = "psutil-5.8.0-cp38-cp38-win_amd64.whl", hash = "sha256:90f31c34d25b1b3ed6c40cdd34ff122b1887a825297c017e4cbd6796dd8b672d"},
+ {file = "psutil-5.8.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:6323d5d845c2785efb20aded4726636546b26d3b577aded22492908f7c1bdda7"},
+ {file = "psutil-5.8.0-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:245b5509968ac0bd179287d91210cd3f37add77dad385ef238b275bad35fa1c4"},
+ {file = "psutil-5.8.0-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:90d4091c2d30ddd0a03e0b97e6a33a48628469b99585e2ad6bf21f17423b112b"},
+ {file = "psutil-5.8.0-cp39-cp39-win32.whl", hash = "sha256:ea372bcc129394485824ae3e3ddabe67dc0b118d262c568b4d2602a7070afdb0"},
+ {file = "psutil-5.8.0-cp39-cp39-win_amd64.whl", hash = "sha256:f4634b033faf0d968bb9220dd1c793b897ab7f1189956e1aa9eae752527127d3"},
+ {file = "psutil-5.8.0.tar.gz", hash = "sha256:0c9ccb99ab76025f2f0bbecf341d4656e9c1351db8cc8a03ccd62e318ab4b5c6"},
]
ptyprocess = [
{file = "ptyprocess-0.7.0-py2.py3-none-any.whl", hash = "sha256:4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35"},
@@ -2737,6 +2837,14 @@ pytest-cov = [
{file = "pytest-cov-2.12.0.tar.gz", hash = "sha256:8535764137fecce504a49c2b742288e3d34bc09eed298ad65963616cc98fd45e"},
{file = "pytest_cov-2.12.0-py2.py3-none-any.whl", hash = "sha256:95d4933dcbbacfa377bb60b29801daa30d90c33981ab2a79e9ab4452c165066e"},
]
+pytest-forked = [
+ {file = "pytest-forked-1.3.0.tar.gz", hash = "sha256:6aa9ac7e00ad1a539c41bec6d21011332de671e938c7637378ec9710204e37ca"},
+ {file = "pytest_forked-1.3.0-py2.py3-none-any.whl", hash = "sha256:dc4147784048e70ef5d437951728825a131b81714b398d5d52f17c7c144d8815"},
+]
+pytest-xdist = [
+ {file = "pytest-xdist-2.2.1.tar.gz", hash = "sha256:718887296892f92683f6a51f25a3ae584993b06f7076ce1e1fd482e59a8220a2"},
+ {file = "pytest_xdist-2.2.1-py3-none-any.whl", hash = "sha256:2447a1592ab41745955fb870ac7023026f20a5f0bfccf1b52a879bd193d46450"},
+]
python-dateutil = [
{file = "python-dateutil-2.8.1.tar.gz", hash = "sha256:73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c"},
{file = "python_dateutil-2.8.1-py2.py3-none-any.whl", hash = "sha256:75bb3f31ea686f1197762692a9ee6a7550b59fc6ca3a1f4b5d7e32fb98e2da2a"},
@@ -3021,8 +3129,8 @@ tornado = [
{file = "tornado-6.1.tar.gz", hash = "sha256:33c6e81d7bd55b468d2e793517c909b139960b6c790a60b7991b9b6b76fb9791"},
]
tqdm = [
- {file = "tqdm-4.60.0-py2.py3-none-any.whl", hash = "sha256:daec693491c52e9498632dfbe9ccfc4882a557f5fa08982db1b4d3adbe0887c3"},
- {file = "tqdm-4.60.0.tar.gz", hash = "sha256:ebdebdb95e3477ceea267decfc0784859aa3df3e27e22d23b83e9b272bf157ae"},
+ {file = "tqdm-4.61.0-py2.py3-none-any.whl", hash = "sha256:736524215c690621b06fc89d0310a49822d75e599fcd0feb7cc742b98d692493"},
+ {file = "tqdm-4.61.0.tar.gz", hash = "sha256:cd5791b5d7c3f2f1819efc81d36eb719a38e0906a7380365c556779f585ea042"},
]
traitlets = [
{file = "traitlets-5.0.5-py3-none-any.whl", hash = "sha256:69ff3f9d5351f31a7ad80443c2674b7099df13cc41fc5fa6e2f6d3b0330b0426"},
@@ -3066,8 +3174,8 @@ typing-extensions = [
{file = "typing_extensions-3.10.0.0.tar.gz", hash = "sha256:50b6f157849174217d0656f99dc82fe932884fb250826c18350e159ec6cdf342"},
]
virtualenv = [
- {file = "virtualenv-20.4.6-py2.py3-none-any.whl", hash = "sha256:307a555cf21e1550885c82120eccaf5acedf42978fd362d32ba8410f9593f543"},
- {file = "virtualenv-20.4.6.tar.gz", hash = "sha256:72cf267afc04bf9c86ec932329b7e94db6a0331ae9847576daaa7ca3c86b29a4"},
+ {file = "virtualenv-20.4.7-py2.py3-none-any.whl", hash = "sha256:2b0126166ea7c9c3661f5b8e06773d28f83322de7a3ff7d06f0aed18c9de6a76"},
+ {file = "virtualenv-20.4.7.tar.gz", hash = "sha256:14fdf849f80dbb29a4eb6caa9875d476ee2a5cf76a5f5415fa2f1606010ab467"},
]
watchdog = [
{file = "watchdog-2.1.2-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:581e3548159fe7d2a9f377a1fbcb41bdcee46849cca8ab803c7ac2e5e04ec77c"},
diff --git a/pyproject.toml b/pyproject.toml
index 8710083d7..b6e3b7e1c 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -71,6 +71,9 @@ gitpython = "^3"
pygithub = "^1"
flake8 = "^3.9.0"
isort = "^5.8.0"
+pytest-xdist = "^2.2"
+psutil = ">=3.0"
+
[tool.poetry.urls]
"Bug Tracker" = "https://github.com/ManimCommunity/manim/issues"
@@ -86,7 +89,7 @@ markers = "platform_python_implementation == 'CPython'"
[tool.pytest.ini_options]
markers = "slow: Mark the test as slow. Can be skipped with --skip_slow"
-addopts = "--cov=manim --cov-report xml --cov-report term"
+addopts = "--no-cov-on-fail --cov=manim --cov-report xml --cov-report term -n auto"
[tool.isort]
# from https://black.readthedocs.io/en/stable/compatible_configs.html
diff --git a/tests/conftest.py b/tests/conftest.py
index 9cfb9784e..5092d3ace 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -3,6 +3,8 @@ import sys
import pytest
+from manim import config, tempconfig
+
def pytest_addoption(parser):
parser.addoption(
@@ -53,11 +55,8 @@ def reset_cfg_file():
cfgfile.write(original)
[email protected](autouse=True)
def temp_media_dir(tmpdir):
- from manim import config
-
- orig_dir = config.media_dir
- config.media_dir = str(tmpdir)
- yield tmpdir
- config.media_dir = orig_dir
+ with tempconfig({"media_dir": str(tmpdir)}):
+ assert config.media_dir == str(tmpdir)
+ yield tmpdir
diff --git a/tests/test_deprecation.py b/tests/test_deprecation.py
index 21895a819..d3e92728b 100644
--- a/tests/test_deprecation.py
+++ b/tests/test_deprecation.py
@@ -1,11 +1,21 @@
-import warnings
+import logging
import pytest
-from manim import logger
from manim.utils.deprecation import deprecated, deprecated_params
+def _get_caplog_record_msg(warn_caplog_manim):
+ logger_name, level, message = warn_caplog_manim.record_tuples[0]
+ return message
+
+
+def warn_caplog_manim(caplog):
+ caplog.set_level(logging.WARNING, logger="manim")
+ yield caplog
+
+
@deprecated
class Foo:
def __init__(self):
@@ -65,11 +75,11 @@ class QuuzAll:
doc_admonition = "\n\n.. admonition:: Deprecated\n :class: attention\n\n "
-def test_deprecate_class_no_args(caplog):
+def test_deprecate_class_no_args(warn_caplog_manim):
"""Test the deprecation of a class (decorator with no arguments)."""
f = Foo()
- assert len(caplog.record_tuples) == 1
- msg = _get_caplog_record_msg(caplog)
+ assert len(warn_caplog_manim.record_tuples) == 1
+ msg = _get_caplog_record_msg(warn_caplog_manim)
assert (
msg
== "The class Foo has been deprecated and may be removed in a later version."
@@ -77,11 +87,11 @@ def test_deprecate_class_no_args(caplog):
assert f.__doc__ == f"{doc_admonition}{msg}"
-def test_deprecate_class_since(caplog):
+def test_deprecate_class_since(warn_caplog_manim):
"""Test the deprecation of a class (decorator with since argument)."""
b = Bar()
- assert len(caplog.record_tuples) == 1
- msg = _get_caplog_record_msg(caplog)
+ assert len(warn_caplog_manim.record_tuples) == 1
+ msg = _get_caplog_record_msg(warn_caplog_manim)
assert (
msg
== "The class Bar has been deprecated since v0.6.0 and may be removed in a later version."
@@ -89,11 +99,11 @@ def test_deprecate_class_since(caplog):
assert b.__doc__ == f"The Bar class.{doc_admonition}{msg}"
-def test_deprecate_class_until(caplog):
+def test_deprecate_class_until(warn_caplog_manim):
"""Test the deprecation of a class (decorator with until argument)."""
bz = Baz()
- assert len(caplog.record_tuples) == 1
- msg = _get_caplog_record_msg(caplog)
+ assert len(warn_caplog_manim.record_tuples) == 1
+ msg = _get_caplog_record_msg(warn_caplog_manim)
assert (
msg
== "The class Baz has been deprecated and is expected to be removed after 06/01/2021."
@@ -101,11 +111,11 @@ def test_deprecate_class_until(caplog):
assert bz.__doc__ == f"The Baz class.{doc_admonition}{msg}"
-def test_deprecate_class_since_and_until(caplog):
+def test_deprecate_class_since_and_until(warn_caplog_manim):
"""Test the deprecation of a class (decorator with since and until arguments)."""
qx = Qux()
- assert len(caplog.record_tuples) == 1
- msg = _get_caplog_record_msg(caplog)
+ assert len(warn_caplog_manim.record_tuples) == 1
+ msg = _get_caplog_record_msg(warn_caplog_manim)
assert (
msg
== "The class Qux has been deprecated since 0.7.0 and is expected to be removed after 0.9.0-rc2."
@@ -113,11 +123,11 @@ def test_deprecate_class_since_and_until(caplog):
assert qx.__doc__ == f"{doc_admonition}{msg}"
-def test_deprecate_class_msg(caplog):
+def test_deprecate_class_msg(warn_caplog_manim):
"""Test the deprecation of a class (decorator with msg argument)."""
qu = Quux()
- assert len(caplog.record_tuples) == 1
- msg = _get_caplog_record_msg(caplog)
+ assert len(warn_caplog_manim.record_tuples) == 1
+ msg = _get_caplog_record_msg(warn_caplog_manim)
assert (
msg
== "The class Quux has been deprecated and may be removed in a later version. Use something else."
@@ -125,11 +135,11 @@ def test_deprecate_class_msg(caplog):
assert qu.__doc__ == f"{doc_admonition}{msg}"
-def test_deprecate_class_replacement(caplog):
+def test_deprecate_class_replacement(warn_caplog_manim):
"""Test the deprecation of a class (decorator with replacement argument)."""
qz = Quuz()
- assert len(caplog.record_tuples) == 1
- msg = _get_caplog_record_msg(caplog)
+ assert len(warn_caplog_manim.record_tuples) == 1
+ msg = _get_caplog_record_msg(warn_caplog_manim)
assert (
msg
== "The class Quuz has been deprecated and may be removed in a later version. Use ReplaceQuuz instead."
@@ -138,11 +148,11 @@ def test_deprecate_class_replacement(caplog):
assert qz.__doc__ == f"{doc_admonition}{doc_msg}"
-def test_deprecate_class_all(caplog):
+def test_deprecate_class_all(warn_caplog_manim):
"""Test the deprecation of a class (decorator with all arguments)."""
qza = QuuzAll()
- assert len(caplog.record_tuples) == 1
- msg = _get_caplog_record_msg(caplog)
+ assert len(warn_caplog_manim.record_tuples) == 1
+ msg = _get_caplog_record_msg(warn_caplog_manim)
assert (
msg
== "The class QuuzAll has been deprecated since 0.7.0 and is expected to be removed after 1.2.1. Use ReplaceQuuz instead. Don't use this please."
@@ -151,11 +161,6 @@ def test_deprecate_class_all(caplog):
assert qza.__doc__ == f"{doc_admonition}{doc_msg}"
-def _get_caplog_record_msg(caplog):
- logger_name, level, message = caplog.record_tuples[0]
- return message
-
-
@deprecated
def useless(**kwargs):
pass
@@ -234,11 +239,11 @@ class Top:
return kwargs
-def test_deprecate_func_no_args(caplog):
+def test_deprecate_func_no_args(warn_caplog_manim):
"""Test the deprecation of a method (decorator with no arguments)."""
useless()
- assert len(caplog.record_tuples) == 1
- msg = _get_caplog_record_msg(caplog)
+ assert len(warn_caplog_manim.record_tuples) == 1
+ msg = _get_caplog_record_msg(warn_caplog_manim)
assert (
msg
== "The function useless has been deprecated and may be removed in a later version."
@@ -246,12 +251,12 @@ def test_deprecate_func_no_args(caplog):
assert useless.__doc__ == f"{doc_admonition}{msg}"
-def test_deprecate_func_in_class_since_and_message(caplog):
+def test_deprecate_func_in_class_since_and_message(warn_caplog_manim):
"""Test the deprecation of a method within a class (decorator with since and message arguments)."""
t = Top()
t.mid_func()
- assert len(caplog.record_tuples) == 1
- msg = _get_caplog_record_msg(caplog)
+ assert len(warn_caplog_manim.record_tuples) == 1
+ msg = _get_caplog_record_msg(warn_caplog_manim)
assert (
msg
== "The method Top.mid_func has been deprecated since 0.8.0 and may be removed in a later version. This method is useless."
@@ -259,11 +264,11 @@ def test_deprecate_func_in_class_since_and_message(caplog):
assert t.mid_func.__doc__ == f"Middle function in Top.{doc_admonition}{msg}"
-def test_deprecate_nested_class_until_and_replacement(caplog):
+def test_deprecate_nested_class_until_and_replacement(warn_caplog_manim):
"""Test the deprecation of a nested class (decorator with until and replacement arguments)."""
n = Top().Nested()
- assert len(caplog.record_tuples) == 1
- msg = _get_caplog_record_msg(caplog)
+ assert len(warn_caplog_manim.record_tuples) == 1
+ msg = _get_caplog_record_msg(warn_caplog_manim)
assert (
msg
== "The class Top.Nested has been deprecated and is expected to be removed after 1.4.0. Use Top.NewNested instead."
@@ -272,12 +277,12 @@ def test_deprecate_nested_class_until_and_replacement(caplog):
assert n.__doc__ == f"{doc_admonition}{doc_msg}"
-def test_deprecate_nested_class_func_since_and_until(caplog):
+def test_deprecate_nested_class_func_since_and_until(warn_caplog_manim):
"""Test the deprecation of a method within a nested class (decorator with since and until arguments)."""
n = Top().NewNested()
n.nested_func()
- assert len(caplog.record_tuples) == 1
- msg = _get_caplog_record_msg(caplog)
+ assert len(warn_caplog_manim.record_tuples) == 1
+ msg = _get_caplog_record_msg(warn_caplog_manim)
assert (
msg
== "The method Top.NewNested.nested_func has been deprecated since 1.0.0 and is expected to be removed after 12/25/2025."
@@ -288,13 +293,13 @@ def test_deprecate_nested_class_func_since_and_until(caplog):
)
-def test_deprecate_nested_func(caplog):
+def test_deprecate_nested_func(warn_caplog_manim):
"""Test the deprecation of a nested method (decorator with no arguments)."""
b = Top().Bottom()
answer = b.normal_func()
answer(1)
- assert len(caplog.record_tuples) == 1
- msg = _get_caplog_record_msg(caplog)
+ assert len(warn_caplog_manim.record_tuples) == 1
+ msg = _get_caplog_record_msg(warn_caplog_manim)
assert (
msg
== "The method Top.Bottom.normal_func.<locals>.nested_func has been deprecated and may be removed in a later version."
@@ -302,36 +307,36 @@ def test_deprecate_nested_func(caplog):
assert answer.__doc__ == f"{doc_admonition}{msg}"
-def test_deprecate_func_params(caplog):
+def test_deprecate_func_params(warn_caplog_manim):
"""Test the deprecation of method parameters (decorator with params argument)."""
t = Top()
t.foo(a=2, b=3, z=4)
- assert len(caplog.record_tuples) == 1
- msg = _get_caplog_record_msg(caplog)
+ assert len(warn_caplog_manim.record_tuples) == 1
+ msg = _get_caplog_record_msg(warn_caplog_manim)
assert (
msg
== "The parameters a and b of method Top.foo have been deprecated and may be removed in a later version. Use something else."
)
-def test_deprecate_func_single_param_since_and_until(caplog):
+def test_deprecate_func_single_param_since_and_until(warn_caplog_manim):
"""Test the deprecation of a single method parameter (decorator with since and until arguments)."""
t = Top()
t.bar(a=1, b=2)
- assert len(caplog.record_tuples) == 1
- msg = _get_caplog_record_msg(caplog)
+ assert len(warn_caplog_manim.record_tuples) == 1
+ msg = _get_caplog_record_msg(warn_caplog_manim)
assert (
msg
== "The parameter a of method Top.bar has been deprecated since v0.2 and is expected to be removed after v0.4."
)
-def test_deprecate_func_param_redirect_tuple(caplog):
+def test_deprecate_func_param_redirect_tuple(warn_caplog_manim):
"""Test the deprecation of a method parameter and redirecting it to a new one using tuple."""
t = Top()
obj = t.baz(x=1, old_param=2)
- assert len(caplog.record_tuples) == 1
- msg = _get_caplog_record_msg(caplog)
+ assert len(warn_caplog_manim.record_tuples) == 1
+ msg = _get_caplog_record_msg(warn_caplog_manim)
assert (
msg
== "The parameter old_param of method Top.baz has been deprecated and may be removed in a later version."
@@ -339,12 +344,12 @@ def test_deprecate_func_param_redirect_tuple(caplog):
assert obj == {"x": 1, "new_param": 2}
-def test_deprecate_func_param_redirect_lambda(caplog):
+def test_deprecate_func_param_redirect_lambda(warn_caplog_manim):
"""Test the deprecation of a method parameter and redirecting it to a new one using lambda function."""
t = Top()
obj = t.qux(runtime_in_ms=500)
- assert len(caplog.record_tuples) == 1
- msg = _get_caplog_record_msg(caplog)
+ assert len(warn_caplog_manim.record_tuples) == 1
+ msg = _get_caplog_record_msg(warn_caplog_manim)
assert (
msg
== "The parameter runtime_in_ms of method Top.qux has been deprecated and may be removed in a later version."
@@ -352,12 +357,12 @@ def test_deprecate_func_param_redirect_lambda(caplog):
assert obj == {"run_time": 0.5}
-def test_deprecate_func_param_redirect_many_to_one(caplog):
+def test_deprecate_func_param_redirect_many_to_one(warn_caplog_manim):
"""Test the deprecation of multiple method parameters and redirecting them to one."""
t = Top()
obj = t.quux(point2D_x=3, point2D_y=5)
- assert len(caplog.record_tuples) == 1
- msg = _get_caplog_record_msg(caplog)
+ assert len(warn_caplog_manim.record_tuples) == 1
+ msg = _get_caplog_record_msg(warn_caplog_manim)
assert (
msg
== "The parameters point2D_x and point2D_y of method Top.quux have been deprecated and may be removed in a later version."
@@ -365,23 +370,23 @@ def test_deprecate_func_param_redirect_many_to_one(caplog):
assert obj == {"point2D": (3, 5)}
-def test_deprecate_func_param_redirect_one_to_many(caplog):
+def test_deprecate_func_param_redirect_one_to_many(warn_caplog_manim):
"""Test the deprecation of one method parameter and redirecting it to many."""
t = Top()
obj1 = t.quuz(point2D=0)
- assert len(caplog.record_tuples) == 1
- msg = _get_caplog_record_msg(caplog)
+ assert len(warn_caplog_manim.record_tuples) == 1
+ msg = _get_caplog_record_msg(warn_caplog_manim)
assert (
msg
== "The parameter point2D of method Top.quuz has been deprecated and may be removed in a later version."
)
assert obj1 == {"x": 0, "y": 0}
- caplog.clear()
+ warn_caplog_manim.clear()
obj2 = t.quuz(point2D=(2, 3))
- assert len(caplog.record_tuples) == 1
- msg = _get_caplog_record_msg(caplog)
+ assert len(warn_caplog_manim.record_tuples) == 1
+ msg = _get_caplog_record_msg(warn_caplog_manim)
assert (
msg
== "The parameter point2D of method Top.quuz has been deprecated and may be removed in a later version."
diff --git a/tests/test_sound.py b/tests/test_sound.py
index ace4c4362..958f6b99e 100644
--- a/tests/test_sound.py
+++ b/tests/test_sound.py
@@ -1,13 +1,14 @@
-import os
import struct
import wave
+from pathlib import Path
from manim import Scene
-def test_add_sound():
+def test_add_sound(tmpdir):
# create sound file
- f = wave.open("noise.wav", "w")
+ sound_loc = Path(tmpdir, "noise.wav")
+ f = wave.open(str(sound_loc), "w")
f.setparams((2, 2, 44100, 0, "NONE", "not compressed"))
for _ in range(22050): # half a second of sound
packed_value = struct.pack("h", 14242)
@@ -17,6 +18,4 @@ def test_add_sound():
f.close()
scene = Scene()
- scene.add_sound("noise.wav")
-
- os.remove("noise.wav")
+ scene.add_sound(sound_loc)
diff --git a/tests/test_texmobject.py b/tests/test_texmobject.py
index 4cb840ebe..e808fab76 100644
--- a/tests/test_texmobject.py
+++ b/tests/test_texmobject.py
@@ -1,27 +1,29 @@
+from pathlib import Path
+
import pytest
-from manim import MathTex, SingleStringMathTex, Tex
+from manim import MathTex, SingleStringMathTex, Tex, config
-def test_MathTex(temp_media_dir):
+def test_MathTex():
MathTex("a^2 + b^2 = c^2")
- assert (temp_media_dir / "Tex" / "3879f6b03bc495cd.svg").exists()
+ assert Path(config.media_dir, "Tex", "3879f6b03bc495cd.svg").exists()
-def test_SingleStringMathTex(temp_media_dir):
+def test_SingleStringMathTex():
SingleStringMathTex("test")
- assert (temp_media_dir / "Tex" / "79822967f1fa1935.svg").exists()
+ assert Path(config.media_dir, "Tex", "79822967f1fa1935.svg").exists()
@pytest.mark.parametrize(
"text_input,length_sub",
[("{{ a }} + {{ b }} = {{ c }}", 5), (r"\frac{1}{a+b\sqrt{2}}", 1)],
)
-def test_double_braces_testing(temp_media_dir, text_input, length_sub):
+def test_double_braces_testing(text_input, length_sub):
t1 = MathTex(text_input)
len(t1.submobjects) == length_sub
-def test_tex(temp_media_dir):
+def test_tex():
Tex("The horse does not eat cucumber salad.")
- assert (temp_media_dir / "Tex" / "983949cac5bdd272.svg").exists()
+ assert Path(config.media_dir, "Tex", "983949cac5bdd272.svg").exists()