curtin-dev team mailing list archive
-
curtin-dev team
-
Mailing list archive
-
Message #02912
Re: [Merge] ~dbungert/curtin:py35-fixes into curtin:release/23.1
Review: Approve
Thank you for keeping this stuff off master :-)
Diff comments:
> diff --git a/tests/integration/webserv.py b/tests/integration/webserv.py
> index f4ce4e4..de30e04 100644
> --- a/tests/integration/webserv.py
> +++ b/tests/integration/webserv.py
> @@ -12,7 +14,17 @@ class ThreadedTCPServer(socketserver.ThreadingMixIn, socketserver.TCPServer):
>
> class ImageHTTPRequestHandler(SimpleHTTPRequestHandler):
> def __init__(self, *args, **kwargs):
> - super().__init__(*args, directory=IMAGE_DIR, **kwargs)
> + try:
> + super().__init__(*args, directory=IMAGE_DIR, **kwargs)
> + except TypeError:
> + # SimpleHTTPRequestHandler in python < 3.7 doesn't take a directory
> + # arg, fake it.
> + curdir = os.getcwd()
> + os.chdir(IMAGE_DIR)
> + try:
> + super().__init__(*args, **kwargs)
> + finally:
> + os.chdir(curdir)
yikes
>
>
> class ImageServer:
> diff --git a/tests/unittests/test_storage_config.py b/tests/unittests/test_storage_config.py
> index a538ece..516d56a 100644
> --- a/tests/unittests/test_storage_config.py
> +++ b/tests/unittests/test_storage_config.py
> @@ -1170,7 +1170,10 @@ class TestSelectConfigs(CiTestCase):
> id1 = {'a': 1, 'c': 3}
> sc = {'id0': id0, 'id1': id1}
>
> - self.assertEqual([id0, id1], select_configs(sc, a=1))
> + actual = select_configs(sc, a=1)
> + self.assertEqual(2, len(actual))
> + self.assertIn(id0, actual)
> + self.assertIn(id1, actual)
Wait why is this one necessary?
>
> def test_not_found(self):
> id0 = {'a': 1, 'b': 2}
--
https://code.launchpad.net/~dbungert/curtin/+git/curtin/+merge/443616
Your team curtin developers is subscribed to branch curtin:release/23.1.
References