launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #23607
Re: [Merge] lp:~matiasb/launchpad/snap-build-request-extra-args into lp:launchpad
Diff comments:
>
> === modified file 'lib/lp/snappy/tests/test_snapbuildbehaviour.py'
> --- lib/lp/snappy/tests/test_snapbuildbehaviour.py 2019-03-06 22:27:11 +0000
> +++ lib/lp/snappy/tests/test_snapbuildbehaviour.py 2019-05-03 13:17:57 +0000
> @@ -86,7 +87,10 @@
> SNAP_SNAPCRAFT_CHANNEL_FEATURE_FLAG,
> SnapBuildArchiveOwnerMismatch,
> )
> -from lp.snappy.model.snapbuildbehaviour import SnapBuildBehaviour
> +from lp.snappy.model.snapbuildbehaviour import (
> + SnapBuildBehaviour,
> + format_as_rfc3339,
> +)
This doesn't match LP's preferred import sorting or indentation style, so please run utilities/format-imports over this file.
> from lp.soyuz.adapters.archivedependencies import (
> get_sources_list_for_building,
> )
> @@ -162,6 +166,22 @@
> self.addCleanup(config.pop, "in-process-proxy-auth-api-fixture")
>
>
> +class FormatAsRfc3339TestCase(TestCaseWithFactory):
Could just be TestCase (also in lp.testing) since this doesn't actually use the factory.
> + layer = LaunchpadZopelessLayer
I'd drop the layer entirely. These are just unit tests with no setup requirements, so the layer just slows things down.
> +
> + def test_simple(self):
> + t = datetime(2016, 1, 1)
> + self.assertEqual('2016-01-01T00:00:00Z', format_as_rfc3339(t))
> +
> + def test_microsecond_is_ignored(self):
> + ts = datetime(2016, 1, 1, microsecond=10)
> + self.assertEqual('2016-01-01T00:00:00Z', format_as_rfc3339(ts))
> +
> + def test_tzinfo_is_ignored(self):
> + tz = datetime(2016, 1, 1, tzinfo=pytz.timezone('US/Eastern'))
> + self.assertEqual('2016-01-01T00:00:00Z', format_as_rfc3339(tz))
> +
> +
> class TestSnapBuildBehaviourBase(TestCaseWithFactory):
> layer = LaunchpadZopelessLayer
>
--
https://code.launchpad.net/~matiasb/launchpad/snap-build-request-extra-args/+merge/366594
Your team Launchpad code reviewers is subscribed to branch lp:launchpad.
References