Zulip Chat Archive

Stream: general

Topic: I broke the tests


Kevin Buzzard (Aug 18 2020 at 20:48):

In an attempt to get #3716 up and running again, I made an irred-with-zero branch of mathlib, which makes with_zero and with_one irreducible. I was surprised how little of mathlib broke with this: I only had to edit 7 files. Continuous integration threw up a shock though -- mathlib built and linted fine, but I broke the tests. What do I do now?

Kevin Buzzard (Aug 18 2020 at 22:05):

On further investigation, I claim that the tests have a bug in. This line here is incorrect. The definition of with_zero in the hidden namespace on line 60 is the one being used here; the has_zero instance defined on line 66 will be, as @Mario Carneiro can confirm, called hidden.has_zero, and so line 74 is abusing the fact that hidden.with_zero = with_zero. Is this what the test is supposed to be testing? Can I "fix" this test?

Mario Carneiro (Aug 18 2020 at 22:07):

I would guess that you should change it to say hidden.with_zero.has_zero

Mario Carneiro (Aug 18 2020 at 22:07):

after making the instance name be that

Kevin Buzzard (Aug 18 2020 at 22:13):

#3859 I just went with the Lean naming conventions :-/

Johan Commelin (Aug 19 2020 at 03:25):

@Kevin Buzzard I kicked it on the queue


Last updated: Dec 20 2023 at 11:08 UTC