Re: [libgpiod v2][PATCH v3 3/4] bindings: python: add tests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 07, 2022 at 04:55:20PM +0200, Bartosz Golaszewski wrote:
> This adds a test-suite for python bindings based on the gpio-sim kernel
> module.
> 
> Signed-off-by: Bartosz Golaszewski <brgl@xxxxxxxx>

<snip>

> +	for (modconst = module_constants; modconst->name; modconst++) {
> +		ret = PyModule_AddIntConstant(module,
> +					      modconst->name, modconst->val);
> +		if (ret) {
> +			Py_DECREF(module);
> +			return NULL;
> +		}
> + 	}
   ^
space before tab

<snip>

> +
> +    # TODO buffer capacity
> +    # def test_read_over_buffer_capacity(self):
> +    #     buf = gpiod.EdgeEventBuffer(2)
> +    #     self.assertTrue(self.request.wait_edge_event(datetime.timedelta(seconds=1)))
> +    #     self.assertEqual(self.request.read_edge_event(buf), 2)
> +    #     self.assertEqual(len(buf), 2)
> +

Why the TODO?  That API has been changed since, no?

So no problems with the tests, though admittedly I've only skimmed them
relative to the other patches as I'm doing them last and have reached the
limits of my attention span.  I may have another look later, but I'd
rather get the other reviews out now than wait until I'm up to that.

Cheers,
Kent.



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux