question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bring test-coverage up

Target:

  • > 95% for cqparts core library
  • > 80% for cqparts_* parts libraries

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
fragmuffincommented, Jan 18, 2018

Added catalogue test automation, documented here. So you can test an entire library catalogue by witing:

from cqparts.catalogue import JSONCatalogue
from cqparts.utils.test import CatalogueTest

catalogue = JSONCatalogue('my_catalogue.json')
CatalogueTest.create_from(catalogue, add_to=globals())

That will be picked up by python -m unittest discover, and run 1 test per catalogue entry. To demonstrate, the test directory’s partslib is tested, resulting in:

test_box_a (cqparts.utils.test.CatalogueTest_catalogue) ... ok
test_box_b (cqparts.utils.test.CatalogueTest_catalogue) ... ok
test_box_c (cqparts.utils.test.CatalogueTest_catalogue) ... ok
test_cs_01 (cqparts.utils.test.CatalogueTest_catalogue) ... ok
test_cs_02 (cqparts.utils.test.CatalogueTest_catalogue) ... ok
test_cs_03 (cqparts.utils.test.CatalogueTest_catalogue) ... ok
test_cyl_a (cqparts.utils.test.CatalogueTest_catalogue) ... ok
test_cyl_b (cqparts.utils.test.CatalogueTest_catalogue) ... ok
test_cyl_c (cqparts.utils.test.CatalogueTest_catalogue) ... ok
test_ford (cqparts.utils.test.CatalogueTest_catalogue) ... ok
test_holden (cqparts.utils.test.CatalogueTest_catalogue) ... ok
test_merc (cqparts.utils.test.CatalogueTest_catalogue) ... ok

Each part’s geometry is built, and assembly constraints are solved… ultimately it’s currently just making sure all deviations listed in the catalogue can be generated without an exception being raised.

I’m quite proud of that one 😊 Next step is to create catalogues for existing components, so they may be tested using this method.

0reactions
fragmuffincommented, Feb 13, 2018

Just discovered that the CatalogueTest utility was just re-creating the same part over and over again… fixed in 698a0c1. The above catalogue tests were re-run with no issue… phew!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Get free at-⁠home COVID-⁠19 tests this winter
The tests available for order: Are rapid antigen at-home tests, not PCR; Can be taken anywhere; Give results within 30 minutes (no lab...
Read more >
Tests - IDRlabs
This page provides an overview of all the free online tests at IDR Labs, including tests in psychology, politics, and more.
Read more >
Personality, IQ, career, love, health and attitude tests
Tests & quizzes: free IQ test, Big 5 personality test, emotional intelligence test (EQ), love tests, career aptitudes test, self-esteem self-test, ...
Read more >
Self Tests | Psychology Today
Self Tests. Are you outgoing or introverted? Do you have a high traditional IQ or emotional IQ? Do you have what it takes...
Read more >
COVID-19 Testing: What You Need to Know - CDC
Testing is not recommended to detect a new infection. My first positive test result was within: 21-90 days. I have symptoms. Use antigen...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found