Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] Failing to assign the default cable length unit when not present #205

Closed
kvid opened this issue Dec 26, 2020 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@kvid
Copy link
Collaborator

kvid commented Dec 26, 2020

The current dev has a bug that fails to assign the default cable length unit when not present. The cause is this line:
https://github.com/formatc1702/WireViz/blob/606ddbf9775da6300299640501083acfaef42077/src/wireviz/DataClasses.py#L231
The wrong attribute is tested. The correct code line should be:

        elif self.length_unit is None:

I'm sorry that I approved #198 without detecting this bug. It was introduced in 694f3a3, and I suggested a modified version still containing the bug, that was applied in d9b67e4, but it was not detectable at run-time before removing the redundant code in e9292fb.

This is a good example of a bug that would have been detected automatically by a proper regression testing protocol (see also #63), e.g. something like:

python build_examples.py
python build_examples.py -b dev-x2 compare

Note that dev-x2 in the command above is a local branch where I have committed the generated files after merging in #70 with eebf932 (the latest commit where the output was intentionally changed).

@kvid kvid changed the title [bug] [bug] Failing to assign the default cable length unit when not present Dec 26, 2020
kvid added a commit to kvid/WireViz that referenced this issue Dec 26, 2020
Bug: Failing to assign the default cable length unit when not present.
It was introduced in wireviz#198.

Fix: Test the correct cable attribute. This fix solves issue wireviz#205.
formatc1702 pushed a commit that referenced this issue Dec 29, 2020
Bug: Failing to assign the default cable length unit when not present.
It was introduced in #198.

Fix: Test the correct cable attribute. This fix solves issue #205.
@formatc1702
Copy link
Collaborator

Thanks.

I hope we can somehow implement a more rigorous and automated regression testing / unit testing soon; unfortunately I can't guarantee I will have the time and energy to dive deeper into this topic. I'll add a comment to #63 and mark it as "help wanted".

formatc1702 added a commit that referenced this issue Dec 29, 2020
@kvid kvid added the bug Something isn't working label Aug 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants