1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-08-31 02:14:10 +02:00

Improve argument handling in the 'develproject' command

This commit is contained in:
2022-11-07 10:36:03 +01:00
parent c6b30e500f
commit 6dcc45f272
10 changed files with 274 additions and 42 deletions

View File

@@ -4,7 +4,7 @@ import tempfile
import unittest
from osc.commandline import pop_project_package_from_args
from osc.oscerr import NoWorkingCopy
from osc.oscerr import NoWorkingCopy, OscValueError
from osc.store import Store
@@ -38,10 +38,7 @@ class TestPopProjectPackageFromArgs(unittest.TestCase):
def test_defaults(self):
args = ["project"]
project, package = pop_project_package_from_args(args, default_package="default-package")
self.assertEqual(project, "project")
self.assertEqual(package, "default-package")
self.assertEqual(args, [])
self.assertRaises(OscValueError, pop_project_package_from_args, args, default_package="default-package")
args = ["project"]
project, package = pop_project_package_from_args(