-
Notifications
You must be signed in to change notification settings - Fork 834
Add tests for the guide book using docmatic
#142
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #142 +/- ##
==========================================
+ Coverage 72.77% 80.91% +8.14%
==========================================
Files 80 82 +2
Lines 3772 4978 +1206
==========================================
+ Hits 2745 4028 +1283
+ Misses 1027 950 -77
Continue to review full report at Codecov.
|
could you add config to the travis config, so travis runs tests on each commit? |
@fafhrd91 : once this is merged all tests will be invoked through |
Good. Thanks |
guide/src/class.md
Outdated
# #![feature(proc_macro, specialization, const_fn)] | ||
# extern crate pyo3; | ||
# use pyo3::prelude::*; | ||
# #[py::class] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
py::class
will fail on the latest nightly; In #147 I've changed all other occurrences of this to
use pyo3::py::class as pyclass;
#[pyclass]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll rebase against the current master then, and remove other occurences. Thanks for the hint !
Cargo.toml
Outdated
@@ -25,6 +25,9 @@ spin = "0.4.6" | |||
num-traits = "0.2" | |||
pyo3cls = { version = "^0.2.1" } | |||
|
|||
[dev-dependencies] | |||
docmatic = { version = "^0.1", git = "https://github.com/assert-rs/docmatic" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like docmatic has now been published to crates.io, so we can use that version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also need to bump the required version to 0.1.2
since I need features I PR'd into the latest release 😉
Related to #84,
I used
docmatic
to generate tests for the documentation, and updated the failing test cases to work with modern versions of the library. Some tests are ignored because they won't compile (for instance the example forInto<PyErr>
implementation will not compile since thestd::io::Error
was not declared in our module).