raisefunction 0.0.0.dev0__tar.gz → 0.0.2.dev0__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.
- {raisefunction-0.0.0.dev0/src/raisefunction.egg-info → raisefunction-0.0.2.dev0}/PKG-INFO +7 -37
- raisefunction-0.0.2.dev0/README.rst +5 -0
- {raisefunction-0.0.0.dev0 → raisefunction-0.0.2.dev0}/pyproject.toml +6 -4
- raisefunction-0.0.2.dev0/src/raisefunction/core/__init__.py +6 -0
- raisefunction-0.0.2.dev0/src/raisefunction/tests/test_1984.py +32 -0
- {raisefunction-0.0.0.dev0 → raisefunction-0.0.2.dev0/src/raisefunction.egg-info}/PKG-INFO +7 -37
- {raisefunction-0.0.0.dev0 → raisefunction-0.0.2.dev0}/src/raisefunction.egg-info/SOURCES.txt +0 -1
- raisefunction-0.0.0.dev0/README.rst +0 -37
- raisefunction-0.0.0.dev0/src/raisefunction/__main__.py +0 -4
- raisefunction-0.0.0.dev0/src/raisefunction/core/__init__.py +0 -2
- raisefunction-0.0.0.dev0/src/raisefunction/tests/test_1984.py +0 -10
- {raisefunction-0.0.0.dev0 → raisefunction-0.0.2.dev0}/LICENSE.txt +0 -0
- {raisefunction-0.0.0.dev0 → raisefunction-0.0.2.dev0}/MANIFEST.in +0 -0
- {raisefunction-0.0.0.dev0 → raisefunction-0.0.2.dev0}/setup.cfg +0 -0
- {raisefunction-0.0.0.dev0 → raisefunction-0.0.2.dev0}/src/raisefunction/__init__.py +0 -0
- {raisefunction-0.0.0.dev0 → raisefunction-0.0.2.dev0}/src/raisefunction/tests/__init__.py +0 -0
- {raisefunction-0.0.0.dev0 → raisefunction-0.0.2.dev0}/src/raisefunction.egg-info/dependency_links.txt +0 -0
- {raisefunction-0.0.0.dev0 → raisefunction-0.0.2.dev0}/src/raisefunction.egg-info/top_level.txt +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: raisefunction
|
|
3
|
-
Version: 0.0.
|
|
4
|
-
Summary:
|
|
3
|
+
Version: 0.0.2.dev0
|
|
4
|
+
Summary: This project provides a function that raises errors passed to it.
|
|
5
5
|
Author-email: Johannes <johannes-programming@mailfence.com>
|
|
6
6
|
License: The MIT License (MIT)
|
|
7
7
|
|
|
@@ -27,7 +27,9 @@ License: The MIT License (MIT)
|
|
|
27
27
|
Project-URL: Download, https://pypi.org/project/raisefunction/#files
|
|
28
28
|
Project-URL: Index, https://pypi.org/project/raisefunction/
|
|
29
29
|
Project-URL: Source, https://github.com/johannes-programming/raisefunction/
|
|
30
|
-
|
|
30
|
+
Project-URL: Website, https://raisefunction.johannes-programming.online/
|
|
31
|
+
Classifier: Development Status :: 2 - Pre-Alpha
|
|
32
|
+
Classifier: Intended Audience :: Developers
|
|
31
33
|
Classifier: License :: OSI Approved :: MIT License
|
|
32
34
|
Classifier: Natural Language :: English
|
|
33
35
|
Classifier: Operating System :: OS Independent
|
|
@@ -35,7 +37,7 @@ Classifier: Programming Language :: Python
|
|
|
35
37
|
Classifier: Programming Language :: Python :: 3
|
|
36
38
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
37
39
|
Classifier: Typing :: Typed
|
|
38
|
-
Requires-Python: >=3.
|
|
40
|
+
Requires-Python: >=3.8
|
|
39
41
|
Description-Content-Type: text/x-rst
|
|
40
42
|
License-File: LICENSE.txt
|
|
41
43
|
|
|
@@ -43,36 +45,4 @@ License-File: LICENSE.txt
|
|
|
43
45
|
raisefunction
|
|
44
46
|
=============
|
|
45
47
|
|
|
46
|
-
|
|
47
|
-
--------
|
|
48
|
-
|
|
49
|
-
raisefunction
|
|
50
|
-
|
|
51
|
-
Installation
|
|
52
|
-
------------
|
|
53
|
-
|
|
54
|
-
To install ``raisefunction``, you can use ``pip``. Open your terminal and run:
|
|
55
|
-
|
|
56
|
-
.. code-block:: bash
|
|
57
|
-
|
|
58
|
-
pip install raisefunction
|
|
59
|
-
|
|
60
|
-
License
|
|
61
|
-
-------
|
|
62
|
-
|
|
63
|
-
This project is licensed under the MIT License.
|
|
64
|
-
|
|
65
|
-
Links
|
|
66
|
-
-----
|
|
67
|
-
|
|
68
|
-
* `Download <https://pypi.org/project/raisefunction/#files>`_
|
|
69
|
-
* `Index <https://pypi.org/project/raisefunction/>`_
|
|
70
|
-
* `Source <https://github.com/johannes-programming/raisefunction/>`_
|
|
71
|
-
|
|
72
|
-
Credits
|
|
73
|
-
-------
|
|
74
|
-
|
|
75
|
-
* Author: Johannes
|
|
76
|
-
* Email: `johannes-programming@mailfence.com <mailto:johannes-programming@mailfence.com>`_
|
|
77
|
-
|
|
78
|
-
Thank you for using ``raisefunction``!
|
|
48
|
+
Visit the website `https://raisefunction.johannes-programming.online/ <https://raisefunction.johannes-programming.online/>`_ for more information.
|
|
@@ -9,7 +9,8 @@ authors = [
|
|
|
9
9
|
{ email = "johannes-programming@mailfence.com", name = "Johannes" },
|
|
10
10
|
]
|
|
11
11
|
classifiers = [
|
|
12
|
-
"Development Status ::
|
|
12
|
+
"Development Status :: 2 - Pre-Alpha",
|
|
13
|
+
"Intended Audience :: Developers",
|
|
13
14
|
"License :: OSI Approved :: MIT License",
|
|
14
15
|
"Natural Language :: English",
|
|
15
16
|
"Operating System :: OS Independent",
|
|
@@ -19,12 +20,12 @@ classifiers = [
|
|
|
19
20
|
"Typing :: Typed",
|
|
20
21
|
]
|
|
21
22
|
dependencies = []
|
|
22
|
-
description = "
|
|
23
|
+
description = "This project provides a function that raises errors passed to it."
|
|
23
24
|
keywords = []
|
|
24
25
|
name = "raisefunction"
|
|
25
26
|
readme = "README.rst"
|
|
26
|
-
requires-python = ">=3.
|
|
27
|
-
version = "0.0.
|
|
27
|
+
requires-python = ">=3.8"
|
|
28
|
+
version = "0.0.2.dev0"
|
|
28
29
|
|
|
29
30
|
[project.license]
|
|
30
31
|
file = "LICENSE.txt"
|
|
@@ -33,3 +34,4 @@ file = "LICENSE.txt"
|
|
|
33
34
|
Download = "https://pypi.org/project/raisefunction/#files"
|
|
34
35
|
Index = "https://pypi.org/project/raisefunction/"
|
|
35
36
|
Source = "https://github.com/johannes-programming/raisefunction/"
|
|
37
|
+
Website = "https://raisefunction.johannes-programming.online/"
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import unittest
|
|
2
|
+
|
|
3
|
+
from raisefunction.core import raisefunction
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class TestRaiseFunction(unittest.TestCase):
|
|
7
|
+
|
|
8
|
+
def test_raise_value_error(self):
|
|
9
|
+
"""Test if raisefunction raises a ValueError as expected."""
|
|
10
|
+
with self.assertRaises(ValueError) as context:
|
|
11
|
+
raisefunction(ValueError("This is a ValueError"))
|
|
12
|
+
self.assertEqual(str(context.exception), "This is a ValueError")
|
|
13
|
+
|
|
14
|
+
def test_raise_type_error(self):
|
|
15
|
+
"""Test if raisefunction raises a TypeError as expected."""
|
|
16
|
+
with self.assertRaises(TypeError) as context:
|
|
17
|
+
raisefunction(TypeError("This is a TypeError"))
|
|
18
|
+
self.assertEqual(str(context.exception), "This is a TypeError")
|
|
19
|
+
|
|
20
|
+
def test_raise_custom_exception(self):
|
|
21
|
+
"""Test if raisefunction raises a custom exception as expected."""
|
|
22
|
+
|
|
23
|
+
class CustomError(Exception):
|
|
24
|
+
pass
|
|
25
|
+
|
|
26
|
+
with self.assertRaises(CustomError) as context:
|
|
27
|
+
raisefunction(CustomError("This is a CustomError"))
|
|
28
|
+
self.assertEqual(str(context.exception), "This is a CustomError")
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
if __name__ == "__main__":
|
|
32
|
+
unittest.main()
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: raisefunction
|
|
3
|
-
Version: 0.0.
|
|
4
|
-
Summary:
|
|
3
|
+
Version: 0.0.2.dev0
|
|
4
|
+
Summary: This project provides a function that raises errors passed to it.
|
|
5
5
|
Author-email: Johannes <johannes-programming@mailfence.com>
|
|
6
6
|
License: The MIT License (MIT)
|
|
7
7
|
|
|
@@ -27,7 +27,9 @@ License: The MIT License (MIT)
|
|
|
27
27
|
Project-URL: Download, https://pypi.org/project/raisefunction/#files
|
|
28
28
|
Project-URL: Index, https://pypi.org/project/raisefunction/
|
|
29
29
|
Project-URL: Source, https://github.com/johannes-programming/raisefunction/
|
|
30
|
-
|
|
30
|
+
Project-URL: Website, https://raisefunction.johannes-programming.online/
|
|
31
|
+
Classifier: Development Status :: 2 - Pre-Alpha
|
|
32
|
+
Classifier: Intended Audience :: Developers
|
|
31
33
|
Classifier: License :: OSI Approved :: MIT License
|
|
32
34
|
Classifier: Natural Language :: English
|
|
33
35
|
Classifier: Operating System :: OS Independent
|
|
@@ -35,7 +37,7 @@ Classifier: Programming Language :: Python
|
|
|
35
37
|
Classifier: Programming Language :: Python :: 3
|
|
36
38
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
37
39
|
Classifier: Typing :: Typed
|
|
38
|
-
Requires-Python: >=3.
|
|
40
|
+
Requires-Python: >=3.8
|
|
39
41
|
Description-Content-Type: text/x-rst
|
|
40
42
|
License-File: LICENSE.txt
|
|
41
43
|
|
|
@@ -43,36 +45,4 @@ License-File: LICENSE.txt
|
|
|
43
45
|
raisefunction
|
|
44
46
|
=============
|
|
45
47
|
|
|
46
|
-
|
|
47
|
-
--------
|
|
48
|
-
|
|
49
|
-
raisefunction
|
|
50
|
-
|
|
51
|
-
Installation
|
|
52
|
-
------------
|
|
53
|
-
|
|
54
|
-
To install ``raisefunction``, you can use ``pip``. Open your terminal and run:
|
|
55
|
-
|
|
56
|
-
.. code-block:: bash
|
|
57
|
-
|
|
58
|
-
pip install raisefunction
|
|
59
|
-
|
|
60
|
-
License
|
|
61
|
-
-------
|
|
62
|
-
|
|
63
|
-
This project is licensed under the MIT License.
|
|
64
|
-
|
|
65
|
-
Links
|
|
66
|
-
-----
|
|
67
|
-
|
|
68
|
-
* `Download <https://pypi.org/project/raisefunction/#files>`_
|
|
69
|
-
* `Index <https://pypi.org/project/raisefunction/>`_
|
|
70
|
-
* `Source <https://github.com/johannes-programming/raisefunction/>`_
|
|
71
|
-
|
|
72
|
-
Credits
|
|
73
|
-
-------
|
|
74
|
-
|
|
75
|
-
* Author: Johannes
|
|
76
|
-
* Email: `johannes-programming@mailfence.com <mailto:johannes-programming@mailfence.com>`_
|
|
77
|
-
|
|
78
|
-
Thank you for using ``raisefunction``!
|
|
48
|
+
Visit the website `https://raisefunction.johannes-programming.online/ <https://raisefunction.johannes-programming.online/>`_ for more information.
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
=============
|
|
2
|
-
raisefunction
|
|
3
|
-
=============
|
|
4
|
-
|
|
5
|
-
Overview
|
|
6
|
-
--------
|
|
7
|
-
|
|
8
|
-
raisefunction
|
|
9
|
-
|
|
10
|
-
Installation
|
|
11
|
-
------------
|
|
12
|
-
|
|
13
|
-
To install ``raisefunction``, you can use ``pip``. Open your terminal and run:
|
|
14
|
-
|
|
15
|
-
.. code-block:: bash
|
|
16
|
-
|
|
17
|
-
pip install raisefunction
|
|
18
|
-
|
|
19
|
-
License
|
|
20
|
-
-------
|
|
21
|
-
|
|
22
|
-
This project is licensed under the MIT License.
|
|
23
|
-
|
|
24
|
-
Links
|
|
25
|
-
-----
|
|
26
|
-
|
|
27
|
-
* `Download <https://pypi.org/project/raisefunction/#files>`_
|
|
28
|
-
* `Index <https://pypi.org/project/raisefunction/>`_
|
|
29
|
-
* `Source <https://github.com/johannes-programming/raisefunction/>`_
|
|
30
|
-
|
|
31
|
-
Credits
|
|
32
|
-
-------
|
|
33
|
-
|
|
34
|
-
* Author: Johannes
|
|
35
|
-
* Email: `johannes-programming@mailfence.com <mailto:johannes-programming@mailfence.com>`_
|
|
36
|
-
|
|
37
|
-
Thank you for using ``raisefunction``!
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{raisefunction-0.0.0.dev0 → raisefunction-0.0.2.dev0}/src/raisefunction.egg-info/top_level.txt
RENAMED
|
File without changes
|