Fix tests

This commit is contained in:
konstin 2018-06-14 16:20:55 +02:00
parent 785d338700
commit f2be73c4f3
4 changed files with 4 additions and 12 deletions

View File

@ -27,7 +27,7 @@ class PyTest(TestCommand):
raise SystemExit(errno)
setup_requires = ['setuptools-rust>=0.6.1']
setup_requires = ['setuptools-rust>=0.10.1']
install_requires = []
tests_require = install_requires + ['pytest', 'pytest-benchmark']

View File

@ -27,7 +27,7 @@ class PyTest(TestCommand):
raise SystemExit(errno)
setup_requires = ['setuptools-rust>=0.6.0']
setup_requires = ['setuptools-rust>=0.10.1']
install_requires = []
tests_require = install_requires + ['pytest', 'pytest-benchmark']

View File

@ -2,7 +2,7 @@
Pyo3's attributes, `#[class]`, `#[modinit]`, etc. are [procedural macros](https://doc.rust-lang.org/unstable-book/language-features/proc-macro.html), which means that rewrite the source of the annotated item. You can view the generated source with the following command, which also expands a few other things:
```rust
```bash
cargo rustc -- -Z unstable-options --pretty=expanded > expanded.rs; rustfmt expanded.rs
```
@ -10,6 +10,6 @@ cargo rustc -- -Z unstable-options --pretty=expanded > expanded.rs; rustfmt expa
You can also debug classic `!`-macros by adding -Z trace-macros`:
```rust
```bash
cargo rustc -- -Z unstable-options --pretty=expanded -Z trace-macros > expanded.rs; rustfmt expanded.rs
```

View File

@ -449,13 +449,6 @@ fn dunder_dict_support() {
inst.a = 1
assert inst.a == 1
"#);
py_run!(py, inst, r#"
import copy
inst2 = copy.deepcopy(inst)
inst2.a = 2
assert inst.a == 1
"#);
}
#[pyclass(weakref, dict)]
@ -470,4 +463,3 @@ fn weakref_dunder_dict_support() {
let inst = Py::new_ref(py, |t| WeakRefDunderDictSupport{token: t}).unwrap();
py_run!(py, inst, "import weakref; assert weakref.ref(inst)() is inst; inst.a = 1; assert inst.a == 1");
}