launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #24655
[Merge] ~cjwatson/launchpad-buildd:py3-dict-ordering into launchpad-buildd:master
Colin Watson has proposed merging ~cjwatson/launchpad-buildd:py3-dict-ordering into launchpad-buildd:master.
Commit message:
Avoid making assumptions about dict iteration order
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad-buildd/+git/launchpad-buildd/+merge/383222
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad-buildd:py3-dict-ordering into launchpad-buildd:master.
diff --git a/debian/changelog b/debian/changelog
index 8943f0a..ad5fdd0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,7 @@ launchpad-buildd (190) UNRELEASED; urgency=medium
* Switch to git; add Vcs-* fields.
* Always call Resource.putChild with path as bytes.
* Switch RotatableFileLogObserver from class advice to a class decorator.
+ * Adjust tests to avoid making assumptions about dict iteration order.
-- Colin Watson <cjwatson@xxxxxxxxxx> Tue, 28 Apr 2020 10:19:27 +0100
diff --git a/lpbuildd/tests/test_oci.py b/lpbuildd/tests/test_oci.py
index 72c9913..35efd5b 100644
--- a/lpbuildd/tests/test_oci.py
+++ b/lpbuildd/tests/test_oci.py
@@ -173,7 +173,7 @@ class TestOCIBuildManagerIteration(TestCase):
"layer_id": "layer-2"
}
}]
- self.assertEqual(digests_contents, json.dumps(digests_expected))
+ self.assertEqual(digests_expected, json.loads(digests_contents))
# Control returns to the DebianBuildManager in the UMOUNT state.
self.buildmanager.iterateReap(self.getState(), 0)
expected_command = [
@@ -256,7 +256,7 @@ class TestOCIBuildManagerIteration(TestCase):
"layer_id": "layer-2"
}
}]
- self.assertEqual(digests_contents, json.dumps(digests_expected))
+ self.assertEqual(digests_expected, json.loads(digests_contents))
# Control returns to the DebianBuildManager in the UMOUNT state.
self.buildmanager.iterateReap(self.getState(), 0)