v440 2.0.0.dev30__tar.gz → 2.0.0.dev31__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.
Files changed (35) hide show
  1. {v440-2.0.0.dev30/src/v440.egg-info → v440-2.0.0.dev31}/PKG-INFO +1 -1
  2. {v440-2.0.0.dev30 → v440-2.0.0.dev31}/pyproject.toml +1 -1
  3. {v440-2.0.0.dev30 → v440-2.0.0.dev31}/src/v440/tests/test_testdata.py +14 -45
  4. {v440-2.0.0.dev30 → v440-2.0.0.dev31}/src/v440/tests/test_version.py +43 -0
  5. {v440-2.0.0.dev30 → v440-2.0.0.dev31/src/v440.egg-info}/PKG-INFO +1 -1
  6. {v440-2.0.0.dev30 → v440-2.0.0.dev31}/LICENSE.txt +0 -0
  7. {v440-2.0.0.dev30 → v440-2.0.0.dev31}/MANIFEST.in +0 -0
  8. {v440-2.0.0.dev30 → v440-2.0.0.dev31}/README.rst +0 -0
  9. {v440-2.0.0.dev30 → v440-2.0.0.dev31}/setup.cfg +0 -0
  10. {v440-2.0.0.dev30 → v440-2.0.0.dev31}/src/v440/__init__.py +0 -0
  11. {v440-2.0.0.dev30 → v440-2.0.0.dev31}/src/v440/_utils/BaseList.py +0 -0
  12. {v440-2.0.0.dev30 → v440-2.0.0.dev31}/src/v440/_utils/Cfg.py +0 -0
  13. {v440-2.0.0.dev30 → v440-2.0.0.dev31}/src/v440/_utils/Digest.py +0 -0
  14. {v440-2.0.0.dev30 → v440-2.0.0.dev31}/src/v440/_utils/Pattern.py +0 -0
  15. {v440-2.0.0.dev30 → v440-2.0.0.dev31}/src/v440/_utils/SimpleQualifierParser.py +0 -0
  16. {v440-2.0.0.dev30 → v440-2.0.0.dev31}/src/v440/_utils/SlotList.py +0 -0
  17. {v440-2.0.0.dev30 → v440-2.0.0.dev31}/src/v440/_utils/VList.py +0 -0
  18. {v440-2.0.0.dev30 → v440-2.0.0.dev31}/src/v440/_utils/__init__.py +0 -0
  19. {v440-2.0.0.dev30 → v440-2.0.0.dev31}/src/v440/_utils/cfg.toml +0 -0
  20. {v440-2.0.0.dev30 → v440-2.0.0.dev31}/src/v440/_utils/qualparse.py +0 -0
  21. {v440-2.0.0.dev30 → v440-2.0.0.dev31}/src/v440/_utils/utils.py +0 -0
  22. {v440-2.0.0.dev30 → v440-2.0.0.dev31}/src/v440/core/Base.py +0 -0
  23. {v440-2.0.0.dev30 → v440-2.0.0.dev31}/src/v440/core/Local.py +0 -0
  24. {v440-2.0.0.dev30 → v440-2.0.0.dev31}/src/v440/core/Public.py +0 -0
  25. {v440-2.0.0.dev30 → v440-2.0.0.dev31}/src/v440/core/Qualification.py +0 -0
  26. {v440-2.0.0.dev30 → v440-2.0.0.dev31}/src/v440/core/Release.py +0 -0
  27. {v440-2.0.0.dev30 → v440-2.0.0.dev31}/src/v440/core/Version.py +0 -0
  28. {v440-2.0.0.dev30 → v440-2.0.0.dev31}/src/v440/core/VersionError.py +0 -0
  29. {v440-2.0.0.dev30 → v440-2.0.0.dev31}/src/v440/core/__init__.py +0 -0
  30. {v440-2.0.0.dev30 → v440-2.0.0.dev31}/src/v440/tests/__init__.py +0 -0
  31. {v440-2.0.0.dev30 → v440-2.0.0.dev31}/src/v440/tests/testdata.toml +0 -0
  32. {v440-2.0.0.dev30 → v440-2.0.0.dev31}/src/v440.egg-info/SOURCES.txt +0 -0
  33. {v440-2.0.0.dev30 → v440-2.0.0.dev31}/src/v440.egg-info/dependency_links.txt +0 -0
  34. {v440-2.0.0.dev30 → v440-2.0.0.dev31}/src/v440.egg-info/requires.txt +0 -0
  35. {v440-2.0.0.dev30 → v440-2.0.0.dev31}/src/v440.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: v440
3
- Version: 2.0.0.dev30
3
+ Version: 2.0.0.dev31
4
4
  Summary: This project provides mutable version objects in accordance with PEP440.
5
5
  Author-email: Johannes <johannes.programming@gmail.com>
6
6
  License: The MIT License (MIT)
@@ -34,7 +34,7 @@ keywords = []
34
34
  name = "v440"
35
35
  readme = "README.rst"
36
36
  requires-python = ">=3.11"
37
- version = "2.0.0.dev30"
37
+ version = "2.0.0.dev31"
38
38
 
39
39
  [project.license]
40
40
  file = "LICENSE.txt"
@@ -8,7 +8,6 @@ from typing import *
8
8
 
9
9
  import iterprod
10
10
  import packaging.version
11
- from catchlib import Catcher
12
11
 
13
12
  from v440.core.Release import Release
14
13
  from v440.core.Version import Version
@@ -78,11 +77,11 @@ class TestVersionLocalVersionError(unittest.TestCase):
78
77
  k: str
79
78
  v: dict
80
79
  for k, v in Util.util.data["local_VersionError"].items():
81
- self.go(**v, key=k)
80
+ with self.subTest(key=k):
81
+ self.go(**v)
82
82
 
83
83
  def go(
84
84
  self: Self,
85
- key: str,
86
85
  query: list,
87
86
  ) -> None:
88
87
  version: Version = Version()
@@ -141,36 +140,6 @@ class TestVersionEpochGo(unittest.TestCase):
141
140
  self.assertEqual(v.epoch, part, msg=msg)
142
141
 
143
142
 
144
- class TestSlicingNoGo(unittest.TestCase):
145
-
146
- def test_slicing_2(self: Self) -> None:
147
- v: Version = Version("1.2.3.4.5.6.7.8.9.10")
148
- catcher: Catcher = Catcher()
149
- with catcher.catch(Exception):
150
- v.public.base.release[-8:15:5] = 777
151
- self.assertNotEqual(catcher.caught, None)
152
-
153
- def test_slicing_7(self: Self) -> None:
154
- # test_slicing_7
155
- v: Version = Version("1.2.3.4.5.6.7.8.9.10")
156
- del v.public.base.release[-8:15:5]
157
- self.assertEqual(str(v), "1.2.4.5.6.7.9.10")
158
-
159
-
160
- class TestDevNoGo(unittest.TestCase):
161
-
162
- def test_initial_none_dev(self: Self) -> None:
163
- v: Version = Version("1.2.3")
164
- self.assertEqual(str(v), "1.2.3")
165
- self.assertIsNone(v.public.qualification.dev)
166
-
167
- def test_dev_as_none(self: Self) -> None:
168
- v: Version = Version("1.2.3")
169
- v.public.qualification.dev = None
170
- self.assertEqual(str(v), "1.2.3")
171
- self.assertIsNone(v.public.qualification.dev)
172
-
173
-
174
143
  class TestSlicingGo(unittest.TestCase):
175
144
  def test_slicing_3(self: Self) -> None:
176
145
  sli: dict = Util.util.data["slicingmethod"]
@@ -259,29 +228,21 @@ class TestDevGo(unittest.TestCase):
259
228
  self.assertEqual(v.public.qualification.dev, v_ans, msg=msg)
260
229
 
261
230
 
262
- class TestVersionSpecifiers(unittest.TestCase):
263
-
264
- def test_version_with_invalid_specifiers(self: Self) -> None:
265
- # Test version with invalid specifiers that should raise an error
266
- with self.assertRaises(VersionError):
267
- Version("1.2.3--4")
268
-
269
- with self.assertRaises(VersionError):
270
- Version("1.2.3a1--4")
231
+ class TestVersionSpecifiersGo(unittest.TestCase):
271
232
 
272
233
  def test_spec_toml(self: Self) -> None:
273
234
  k: str
274
235
  v: dict
275
236
  for k, v in Util.util.data["spec"].items():
276
- self.spec(**v, key=k)
237
+ self.go(**v, key=k)
277
238
 
278
- def spec(self: Self, string_a: str, string_b: str, key: str = "") -> None:
239
+ def go(self: Self, string_a: str, string_b: str, key: str = "") -> None:
279
240
  msg: str = "spec %r" % key
280
241
  version: Version = Version(string_a)
281
242
  self.assertEqual(str(version), string_b, msg=msg)
282
243
 
283
244
 
284
- class TestPackaging(unittest.TestCase):
245
+ class TestPackagingA(unittest.TestCase):
285
246
  def test_strings_a(self: Self) -> None:
286
247
  a: packaging.version.Version
287
248
  b: str
@@ -298,6 +259,8 @@ class TestPackaging(unittest.TestCase):
298
259
  g = Version(s).format(f)
299
260
  self.assertEqual(b, g)
300
261
 
262
+
263
+ class TestPackagingB(unittest.TestCase):
301
264
  def test_strings_b(self: Self) -> None:
302
265
  a: packaging.version.Version
303
266
  b: packaging.version.Version
@@ -312,6 +275,8 @@ class TestPackaging(unittest.TestCase):
312
275
  msg = f"{s} should match packaging.version.Version"
313
276
  self.assertEqual(a, b, msg=msg)
314
277
 
278
+
279
+ class TestPackagingC(unittest.TestCase):
315
280
  def test_strings_c(self: Self) -> None:
316
281
  pure: list = list()
317
282
  l: list
@@ -343,6 +308,8 @@ class TestPackaging(unittest.TestCase):
343
308
  msg = f"{op} should match for {x!r} and {y!r}"
344
309
  self.assertEqual(native, convert, msg=msg)
345
310
 
311
+
312
+ class TestPackagingField(unittest.TestCase):
346
313
  def test_field(self: Self) -> None:
347
314
  versionable: list = list()
348
315
  l: list
@@ -369,6 +336,8 @@ class TestPackaging(unittest.TestCase):
369
336
  version_obj.local = v.packaging().local
370
337
  self.assertEqual(str(v.local), str(version_obj.local))
371
338
 
339
+
340
+ class TestPackagingExc(unittest.TestCase):
372
341
  def test_exc_pack(self: Self) -> None:
373
342
  impure: list = list()
374
343
  l: list
@@ -1,6 +1,8 @@
1
1
  import unittest
2
2
  from typing import *
3
3
 
4
+ from catchlib import Catcher
5
+
4
6
  from v440.core.Qualification import Qualification
5
7
  from v440.core.Version import Version
6
8
  from v440.core.VersionError import VersionError
@@ -396,5 +398,46 @@ class TestVersionLocal(unittest.TestCase):
396
398
  self.assertEqual(result, [1, "dev", "build"])
397
399
 
398
400
 
401
+ class TestSlicingNoGo(unittest.TestCase):
402
+
403
+ def test_slicing_2(self: Self) -> None:
404
+ v: Version = Version("1.2.3.4.5.6.7.8.9.10")
405
+ catcher: Catcher = Catcher()
406
+ with catcher.catch(Exception):
407
+ v.public.base.release[-8:15:5] = 777
408
+ self.assertNotEqual(catcher.caught, None)
409
+
410
+ def test_slicing_7(self: Self) -> None:
411
+ # test_slicing_7
412
+ v: Version = Version("1.2.3.4.5.6.7.8.9.10")
413
+ del v.public.base.release[-8:15:5]
414
+ self.assertEqual(str(v), "1.2.4.5.6.7.9.10")
415
+
416
+
417
+ class TestDevNoGo(unittest.TestCase):
418
+
419
+ def test_initial_none_dev(self: Self) -> None:
420
+ v: Version = Version("1.2.3")
421
+ self.assertEqual(str(v), "1.2.3")
422
+ self.assertIsNone(v.public.qualification.dev)
423
+
424
+ def test_dev_as_none(self: Self) -> None:
425
+ v: Version = Version("1.2.3")
426
+ v.public.qualification.dev = None
427
+ self.assertEqual(str(v), "1.2.3")
428
+ self.assertIsNone(v.public.qualification.dev)
429
+
430
+
431
+ class TestVersionSpecifiersNoGo(unittest.TestCase):
432
+
433
+ def test_version_with_invalid_specifiers(self: Self) -> None:
434
+ # Test version with invalid specifiers that should raise an error
435
+ with self.assertRaises(VersionError):
436
+ Version("1.2.3--4")
437
+
438
+ with self.assertRaises(VersionError):
439
+ Version("1.2.3a1--4")
440
+
441
+
399
442
  if __name__ == "__main__":
400
443
  unittest.main()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: v440
3
- Version: 2.0.0.dev30
3
+ Version: 2.0.0.dev31
4
4
  Summary: This project provides mutable version objects in accordance with PEP440.
5
5
  Author-email: Johannes <johannes.programming@gmail.com>
6
6
  License: The MIT License (MIT)
File without changes
File without changes
File without changes
File without changes