snate 0.1.0__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.
snate-0.1.0/.gitignore ADDED
@@ -0,0 +1,10 @@
1
+ # Python-generated files
2
+ __pycache__/
3
+ *.py[oc]
4
+ build/
5
+ dist/
6
+ wheels/
7
+ *.egg-info
8
+
9
+ # Virtual environments
10
+ .venv
@@ -0,0 +1 @@
1
+ 3.14
snate-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,5 @@
1
+ Metadata-Version: 2.4
2
+ Name: snate
3
+ Version: 0.1.0
4
+ Summary: Missing test framework for python
5
+ Requires-Python: >=3.14
snate-0.1.0/README.md ADDED
File without changes
snate-0.1.0/main.py ADDED
@@ -0,0 +1,49 @@
1
+ class Snate:
2
+ RESET = "\033[0m"
3
+ RED = "\033[31m"
4
+ GREEN = "\033[32m"
5
+ YELLOW = "\033[33m"
6
+ CYAN = "\033[36m"
7
+
8
+ def __init__(self):
9
+ self.tests = []
10
+ self.failed = 0
11
+ self.passed = 0
12
+
13
+ def test(self):
14
+ print("")
15
+ for test in self.tests:
16
+
17
+ func_name = test[0].__name__
18
+ print(f"{self.CYAN}test {func_name} ... {self.RESET}", end = "")
19
+
20
+ result = test[0]()
21
+ if result == test[1]:
22
+ print(f"{self.GREEN}ok.{self.RESET}")
23
+ print("")
24
+ self.passed += 1
25
+ else:
26
+ print(f"{self.RED}FAILED.{self.RESET}")
27
+ print("")
28
+ print(f"{self.YELLOW}expected: {test[1]}{self.RESET}")
29
+ print(f"{self.YELLOW}actual: {result}{self.RESET}")
30
+ print("")
31
+ self.failed += 1
32
+
33
+ print(f"{self.CYAN}test result: {self.RESET}", end = "")
34
+ print(f"{self.GREEN}{self.passed} passed{self.RESET};", end = " ")
35
+ print(f"{self.RED}{self.failed} failed{self.RESET}.")
36
+ print("")
37
+
38
+ if self.failed != 0:
39
+ status = f"{self.RED}FAILED.{self.RESET}"
40
+ else:
41
+ status = f"{self.GREEN}ok.{self.RESET}"
42
+
43
+ print(f"{self.CYAN}total: {status}{self.RESET}")
44
+
45
+ def add(self , func, expected):
46
+ self.tests.append([func, expected])
47
+
48
+
49
+
snate-0.1.0/publish.sh ADDED
@@ -0,0 +1,4 @@
1
+ #!/bin/bash
2
+
3
+ uv build
4
+ uv publish --token "pypi-AgEIcHlwaS5vcmcCJGQ5MzBmODIyLTZiODQtNDVkZC1iYmM1LTIxYmZhNjNhNmUyNAACKlszLCJlM2Y1NzljMS02Njg2LTRlOTktOTFmZi1lODg2ZDI1MTM2ZmMiXQAABiBhQnmW1AcqXh4C6a4QXYnhG7Bk_TR_zeZYBoklSbt1WQ"
@@ -0,0 +1,11 @@
1
+ [project]
2
+ name = "snate"
3
+ version = "0.1.0"
4
+ description = "Missing test framework for python"
5
+ readme = "README.md"
6
+ requires-python = ">=3.14"
7
+ dependencies = []
8
+
9
+ [build-system]
10
+ requires = ["hatchling"]
11
+ build-backend = "hatchling.build"
snate-0.1.0/uv.lock ADDED
@@ -0,0 +1,8 @@
1
+ version = 1
2
+ revision = 2
3
+ requires-python = ">=3.14"
4
+
5
+ [[package]]
6
+ name = "snate"
7
+ version = "0.1.0"
8
+ source = { virtual = "." }