QInfer / python-qinfer

Library for Bayesian inference via sequential Monte Carlo for quantum parameter estimation.
BSD 3-Clause "New" or "Revised" License
92 stars 31 forks source link

Tests for Domains #115

Closed ihincks closed 7 years ago

ihincks commented 7 years ago

This PR adds a fairly comprehensive set of tests for concrete classes inheriting from Domain. This caught one bug in MultinomialDomain.example_point due to a comma (fixed), and a couple of pretty obscure bugs, like reporting 1j is in RealDomain since technically 1j<np.inf (also fixed).

Note: Sorry, again, for all the trailing whitespace removal. My stupid (but nice in most other ways) text editor does this by default and without warning whenever you save a file. I have now figured out how to disable it.

ihincks commented 7 years ago
coveralls commented 7 years ago

Coverage Status

Coverage increased (+1.5%) to 69.194% when pulling 4b6a2e4a4a005a212c33c8c7a4d6ce5a71c0083f on ihincks:feature-domain-tests into ddac8218f5367f303a7e98e191fbf4b7731e2af5 on QInfer:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+1.5%) to 69.194% when pulling 4b6a2e4a4a005a212c33c8c7a4d6ce5a71c0083f on ihincks:feature-domain-tests into ddac8218f5367f303a7e98e191fbf4b7731e2af5 on QInfer:master.

ihincks commented 7 years ago

Okay, I think this will now pass when #116 is merged.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+1.5%) to 69.194% when pulling e2566ead016cca7b5d72bbc97745011c62f9b99d on ihincks:feature-domain-tests into ddac8218f5367f303a7e98e191fbf4b7731e2af5 on QInfer:master.

ihincks commented 7 years ago

I think it is the The command "pylint --py3k qinfer/" exited with 2. ?

cgranade commented 7 years ago

Seems as though there's a Py3 compatibility warning in qinfer.tests.base_test that's triggering the exit code of 2? Weirdly, that's not happening when actually running Py3, so I'm not quite sure what's going on there. I'll investigate in the morning.

ihincks commented 7 years ago

Not sure if this will fix it, but you reminded me I had some print statements in base_test.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+1.5%) to 69.194% when pulling cba6647e7f17212810b2c73748b61f32c7a1196a on ihincks:feature-domain-tests into ddac8218f5367f303a7e98e191fbf4b7731e2af5 on QInfer:master.

ihincks commented 7 years ago

Okay, that was it, going ahead with merge. Thanks for the review!