We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The following test case for acme thread parsing:
bd_warehouse/tests/test_thread.py
Lines 136 to 137 in 5142c34
============================= test session starts ============================== platform linux -- Python 3.12.5, pytest-8.3.2, pluggy-1.5.0 rootdir: /home/ethan/code/ocp.nix/bd_warehouse configfile: pyproject.toml collected 19 items tests/test_thread.py .........F......... [100%] =================================== FAILURES =================================== _________________________ TestAcmeThread.test_parsing __________________________ self = <test_thread.TestAcmeThread testMethod=test_parsing> def test_parsing(self): with self.assertRaises(ValueError): AcmeThread(size="1 1/4", length=1 * IN, external=False, hand="righty") with self.assertRaises(ValueError): > AcmeThread(size="1.25", length=1 * IN) tests/test_thread.py:137: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def __init__( self, size: str, length: float, external: bool = True, hand: Literal["right", "left"] = "right", end_finishes: tuple[ Literal["raw", "square", "fade", "chamfer"], Literal["raw", "square", "fade", "chamfer"], ] = ("fade", "fade"), interference: float = 0.2, rotation: RotationLike = (0, 0, 0), align: Union[None, Align, tuple[Align, Align, Align]] = None, mode: Mode = Mode.ADD, ): diameter = imperial_str_to_float(size) > pitch = AcmeThread.acme_pitch[size] E KeyError: '1.25' src/bd_warehouse/thread.py:742: KeyError =============================== warnings summary =============================== tests/test_thread.py: 32 warnings /home/ethan/code/ocp.nix/bd_warehouse/src/bd_warehouse/thread.py:517: DeprecationWarning: make_compound() will be deprecated - use the Compound constructor instead part=Compound.make_compound(bd_object.solids()), -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info ============================ FAILED tests/test_thread.py::TestAcmeThread::test_parsing - KeyError: '1.25' ================== 1 failed, 18 passed, 32 warnings in 12.90s ==================
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The following test case for acme thread parsing:
bd_warehouse/tests/test_thread.py
Lines 136 to 137 in 5142c34
fails as it throws a key error instead of a value error.
Pytest output
The text was updated successfully, but these errors were encountered: