pytest-nowtempmail 0.1.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,8 @@
1
+ dist/
2
+ build/
3
+ *.egg-info/
4
+ .venv/
5
+ __pycache__/
6
+ .pytest_cache/
7
+ .mypy_cache/
8
+ .ruff_cache/
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 NowTempMail
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,81 @@
1
+ Metadata-Version: 2.5
2
+ Name: pytest-nowtempmail
3
+ Version: 0.1.2
4
+ Summary: pytest fixtures for disposable inboxes and the OTP codes that land in them.
5
+ Project-URL: Homepage, https://nowtempmail.com/developers
6
+ Project-URL: Source, https://github.com/nowtempmail/nowtempmail-python
7
+ Author: NowTempMail
8
+ License: MIT License
9
+
10
+ Copyright (c) 2026 NowTempMail
11
+
12
+ Permission is hereby granted, free of charge, to any person obtaining a copy
13
+ of this software and associated documentation files (the "Software"), to deal
14
+ in the Software without restriction, including without limitation the rights
15
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
+ copies of the Software, and to permit persons to whom the Software is
17
+ furnished to do so, subject to the following conditions:
18
+
19
+ The above copyright notice and this permission notice shall be included in all
20
+ copies or substantial portions of the Software.
21
+
22
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28
+ SOFTWARE.
29
+ License-File: LICENSE
30
+ Keywords: disposable-email,e2e,email,fixtures,otp,pytest,testing
31
+ Classifier: Development Status :: 4 - Beta
32
+ Classifier: Framework :: Pytest
33
+ Classifier: Intended Audience :: Developers
34
+ Classifier: License :: OSI Approved :: MIT License
35
+ Classifier: Operating System :: OS Independent
36
+ Classifier: Programming Language :: Python :: 3
37
+ Classifier: Topic :: Software Development :: Testing
38
+ Requires-Python: >=3.10
39
+ Requires-Dist: nowtempmail>=0.1.0
40
+ Requires-Dist: pytest>=8.0
41
+ Description-Content-Type: text/markdown
42
+
43
+ # pytest-nowtempmail
44
+
45
+ pytest fixtures for disposable inboxes and the OTP codes that land in them.
46
+
47
+ ```bash
48
+ pip install pytest-nowtempmail
49
+ export NTM_API_KEY="ntm_live_..." # get one at https://nowtempmail.com/developers
50
+ ```
51
+
52
+ ```python
53
+ def test_signup(page, ntm_inbox):
54
+ page.goto("/signup")
55
+ page.fill("#email", ntm_inbox.address)
56
+ page.click("text=Create account")
57
+ page.fill("#code", ntm_inbox.wait_for_code()) # only this test's mail
58
+ ```
59
+
60
+ Verification codes are extracted server-side, so there is no regex to write and
61
+ no message body is transferred to find one.
62
+
63
+ | Fixture | Scope | What it is |
64
+ |---|---|---|
65
+ | `ntm_inbox` | session | One mailbox shared by every test, with per-test watermarking so waits stay isolated. **Start here.** |
66
+ | `ntm_fresh_inbox` | function | A mailbox of this test's own. Spends daily quota that is never refunded. |
67
+ | `ntm_client` | session | The underlying `NowTempMail` client. |
68
+ | `ntm_options` | session | Resolved configuration, for overriding in a conftest. |
69
+
70
+ This package is a thin shim: it declares the `pytest11` entry point and depends
71
+ on [`nowtempmail`](https://pypi.org/project/nowtempmail/), where the fixtures
72
+ actually live. Installing it gets you both.
73
+
74
+ **Full documentation — the sharing and quota model, watermarking and its
75
+ one-second limit, what does and does not reach your CI report, and the client
76
+ API — is in the [`nowtempmail`
77
+ README](https://github.com/nowtempmail/nowtempmail-python#readme).** It is not
78
+ duplicated here, because two copies of the same guidance drift and the wrong one
79
+ is always the one you read.
80
+
81
+ MIT licensed.
@@ -0,0 +1,39 @@
1
+ # pytest-nowtempmail
2
+
3
+ pytest fixtures for disposable inboxes and the OTP codes that land in them.
4
+
5
+ ```bash
6
+ pip install pytest-nowtempmail
7
+ export NTM_API_KEY="ntm_live_..." # get one at https://nowtempmail.com/developers
8
+ ```
9
+
10
+ ```python
11
+ def test_signup(page, ntm_inbox):
12
+ page.goto("/signup")
13
+ page.fill("#email", ntm_inbox.address)
14
+ page.click("text=Create account")
15
+ page.fill("#code", ntm_inbox.wait_for_code()) # only this test's mail
16
+ ```
17
+
18
+ Verification codes are extracted server-side, so there is no regex to write and
19
+ no message body is transferred to find one.
20
+
21
+ | Fixture | Scope | What it is |
22
+ |---|---|---|
23
+ | `ntm_inbox` | session | One mailbox shared by every test, with per-test watermarking so waits stay isolated. **Start here.** |
24
+ | `ntm_fresh_inbox` | function | A mailbox of this test's own. Spends daily quota that is never refunded. |
25
+ | `ntm_client` | session | The underlying `NowTempMail` client. |
26
+ | `ntm_options` | session | Resolved configuration, for overriding in a conftest. |
27
+
28
+ This package is a thin shim: it declares the `pytest11` entry point and depends
29
+ on [`nowtempmail`](https://pypi.org/project/nowtempmail/), where the fixtures
30
+ actually live. Installing it gets you both.
31
+
32
+ **Full documentation — the sharing and quota model, watermarking and its
33
+ one-second limit, what does and does not reach your CI report, and the client
34
+ API — is in the [`nowtempmail`
35
+ README](https://github.com/nowtempmail/nowtempmail-python#readme).** It is not
36
+ duplicated here, because two copies of the same guidance drift and the wrong one
37
+ is always the one you read.
38
+
39
+ MIT licensed.
@@ -0,0 +1,62 @@
1
+ # pytest-nowtempmail -- the shim.
2
+ #
3
+ # It contains no code. Its entire job is to own the `pytest11` entry point and
4
+ # to exist under a name people search for.
5
+ #
6
+ # Why it is separate from `nowtempmail`
7
+ # -------------------------------------
8
+ # Two reasons, and the second is the important one.
9
+ #
10
+ # 1. A `pytest11` entry point is auto-loaded into EVERY pytest session in the
11
+ # environment. An application that imports the client to send itself a test
12
+ # email should not thereby register a pytest plugin in its own test runs.
13
+ #
14
+ # 2. **The name is the distribution channel.** `pytest-` is how these fixtures
15
+ # get found: by people browsing PyPI's plugin listing, and by everyone who
16
+ # has ever searched "pytest otp fixture". Nobody searches for "nowtempmail" --
17
+ # that is the name of a product they have not heard of yet.
18
+ #
19
+ # The plugin CODE lives in `nowtempmail.pytest_plugin`, so there is one place to
20
+ # maintain and one test suite. This distribution should release rarely, usually
21
+ # only to widen the floor pin below.
22
+
23
+ [build-system]
24
+ requires = ["hatchling>=1.21"]
25
+ build-backend = "hatchling.build"
26
+
27
+ [project]
28
+ name = "pytest-nowtempmail"
29
+ version = "0.1.2"
30
+ description = "pytest fixtures for disposable inboxes and the OTP codes that land in them."
31
+ readme = "README.md"
32
+ license = { file = "LICENSE" }
33
+ authors = [{ name = "NowTempMail" }]
34
+ requires-python = ">=3.10"
35
+ keywords = ["pytest", "testing", "otp", "email", "disposable-email", "fixtures", "e2e"]
36
+ classifiers = [
37
+ "Development Status :: 4 - Beta",
38
+ "Framework :: Pytest",
39
+ "Intended Audience :: Developers",
40
+ "License :: OSI Approved :: MIT License",
41
+ "Operating System :: OS Independent",
42
+ "Programming Language :: Python :: 3",
43
+ "Topic :: Software Development :: Testing",
44
+ ]
45
+
46
+ # A floor, not a pin: this shim declares no behaviour of its own, so it should
47
+ # not stop a user taking a newer SDK. tools/publish-mirror.mjs cross-checks that
48
+ # this floor can actually resolve -- a shim released against an SDK version that
49
+ # does not exist yet installs cleanly and then fails at import.
50
+ dependencies = ["nowtempmail>=0.1.0", "pytest>=8.0"]
51
+
52
+ [project.urls]
53
+ Homepage = "https://nowtempmail.com/developers"
54
+ Source = "https://github.com/nowtempmail/nowtempmail-python"
55
+
56
+ [project.entry-points.pytest11]
57
+ nowtempmail = "nowtempmail.pytest_plugin"
58
+
59
+ [tool.hatch.build.targets.wheel]
60
+ # No Python package of its own. The wheel carries metadata and the entry point;
61
+ # the importable module comes from the `nowtempmail` dependency.
62
+ bypass-selection = true