Some checks failed
Mark stable commit / test-unit (push) Has been cancelled
Mark stable commit / test-integration (push) Has been cancelled
Mark stable commit / test-env-virtual (push) Has been cancelled
Mark stable commit / test-env-nix (push) Has been cancelled
Mark stable commit / test-e2e (push) Has been cancelled
Mark stable commit / test-virgin-user (push) Has been cancelled
Mark stable commit / test-virgin-root (push) Has been cancelled
Mark stable commit / linter-shell (push) Has been cancelled
Mark stable commit / linter-python (push) Has been cancelled
Mark stable commit / mark-stable (push) Has been cancelled
* Introduce publish action with PyPI target detection via MIRRORS * Resolve version from SemVer git tags on HEAD * Support preview mode and non-interactive CI usage * Build and upload artifacts using build + twine with token resolution * Add CLI wiring (dispatch, command handler, parser) * Add E2E publish help tests for pkgmgr and nix run * Add integration tests for publish preview and mirror handling * Add unit tests for git tag parsing, PyPI URL parsing, workflow preview, and CLI handler * Clean up dispatch and parser structure while integrating publish https://chatgpt.com/share/693f0f00-af68-800f-8846-193dca69bd2e
14 lines
425 B
Python
14 lines
425 B
Python
|
|
import unittest
|
|
from pkgmgr.actions.publish.pypi_url import parse_pypi_project_url
|
|
|
|
|
|
class TestParsePyPIUrl(unittest.TestCase):
|
|
def test_valid_pypi_url(self):
|
|
t = parse_pypi_project_url("https://pypi.org/project/example/")
|
|
self.assertIsNotNone(t)
|
|
self.assertEqual(t.project, "example")
|
|
|
|
def test_invalid_url(self):
|
|
self.assertIsNone(parse_pypi_project_url("https://example.com/foo"))
|