test: improve sample_degseq() tests#1315
Conversation
Current Aviator status
This PR was merged using Aviator.
See the real-time status of this PR on the
Aviator webapp.
Use the Aviator Chrome Extension
to see the status of your PR within GitHub.
|
|
will rebase once #1297 is merged. |
cd7c7cb to
9710ffe
Compare
|
@szhorvat do you feel strongly about any of the test cases I removed? See my first comment. |
|
Is the code you quote in the top post what you removed? It's a bit hard to follow what's missing since code was moved between files. It seems to me that the tests that you quote were all relevant. Why were they removed? I'm a bit lost. |
Because I couldn't see what they brought based on the tests that are now in there, and they're a bit complicated (for instance, why is there a need to define the function called |
|
These tests verify that the properties that the function guarantees actually hold:
I don't mind a refactoring of the test, but all these properties should be tested, ideally for all methods, including both the undirected and directed case. There is a real risk that a refactoring of this function will accidentally break some of these properties, so it's important to test them. |
|
P.S. It'd be good to rename the methods in this function quite soon, see #876. The current names are rather bad and confusing, I can't even remember which properties hold for which method without looking them up ... This is why I didn't list them. |
|
ok, I'll add the tests back. thank you! |
|
@szhorvat in what could be a more explicit name for gc? it'd help me (and future contributors I guess) understand the test. |
|
this is nearly ready but I'd like to rename the helper function with your feedback. All tests are now in there, and they don't re-use the name "g" and "nG". |
fc615a7 to
4c0e8a7
Compare
I'm sorry, I'm not paying attention ... "gc" refers to the giant component and actually we have a function for that now! It's called Let's do |
26eb84b to
bb2bc93
Compare
|
mmmh why was this merged before the checks were run?! |
|
@krlmlr did the Aviator settings somehow change? |
|
Weird, let's keep an eye on that. |
sample_degseq()example #1297