tests/common.rs -> src/tests/common.rs
This commit is contained in:
parent
c8f82be32c
commit
7d486bb72a
|
@ -1,7 +1,7 @@
|
|||
#[macro_use]
|
||||
pub(crate) mod common {
|
||||
use crate as pyo3;
|
||||
include!("../../tests/common.rs");
|
||||
include!("./common.rs");
|
||||
}
|
||||
|
||||
/// Test macro hygiene - this is in the crate since we won't have
|
||||
|
|
|
@ -4,6 +4,7 @@ use pyo3::class::basic::CompareOp;
|
|||
use pyo3::prelude::*;
|
||||
use pyo3::py_run;
|
||||
|
||||
#[path = "../src/tests/common.rs"]
|
||||
mod common;
|
||||
|
||||
#[pyclass]
|
||||
|
|
|
@ -9,6 +9,7 @@ use std::{
|
|||
};
|
||||
|
||||
#[macro_use]
|
||||
#[path = "../src/tests/common.rs"]
|
||||
mod common;
|
||||
|
||||
enum TestGetBufferError {
|
||||
|
|
|
@ -12,6 +12,7 @@ use std::ptr;
|
|||
use std::sync::atomic::{AtomicBool, Ordering};
|
||||
use std::sync::Arc;
|
||||
|
||||
#[path = "../src/tests/common.rs"]
|
||||
mod common;
|
||||
|
||||
#[pyclass]
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
use pyo3::prelude::*;
|
||||
use pyo3::types::PyBytes;
|
||||
|
||||
#[path = "../src/tests/common.rs"]
|
||||
mod common;
|
||||
|
||||
#[pyfunction]
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
use pyo3::prelude::*;
|
||||
|
||||
#[path = "../src/tests/common.rs"]
|
||||
mod common;
|
||||
|
||||
#[pyclass]
|
||||
|
|
|
@ -4,6 +4,7 @@ use pyo3::prelude::*;
|
|||
use pyo3::types::PyType;
|
||||
use pyo3::{py_run, PyClass};
|
||||
|
||||
#[path = "../src/tests/common.rs"]
|
||||
mod common;
|
||||
|
||||
#[pyclass]
|
||||
|
|
|
@ -4,6 +4,7 @@ use pyo3::prelude::*;
|
|||
use pyo3::ToPyObject;
|
||||
|
||||
#[macro_use]
|
||||
#[path = "../src/tests/common.rs"]
|
||||
mod common;
|
||||
|
||||
#[pyclass]
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
use pyo3::prelude::*;
|
||||
|
||||
#[path = "../src/tests/common.rs"]
|
||||
mod common;
|
||||
|
||||
// Test default generated __repr__.
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
use pyo3::prelude::*;
|
||||
use pyo3::{py_run, wrap_pyfunction};
|
||||
|
||||
#[path = "../src/tests/common.rs"]
|
||||
mod common;
|
||||
|
||||
#[pyclass]
|
||||
|
|
|
@ -7,6 +7,7 @@ use std::fmt;
|
|||
#[cfg(not(target_os = "windows"))]
|
||||
use std::fs::File;
|
||||
|
||||
#[path = "../src/tests/common.rs"]
|
||||
mod common;
|
||||
|
||||
#[pyfunction]
|
||||
|
|
|
@ -5,6 +5,7 @@ use pyo3::prelude::*;
|
|||
use pyo3::types::{PyDict, PyList, PyString, PyTuple};
|
||||
|
||||
#[macro_use]
|
||||
#[path = "../src/tests/common.rs"]
|
||||
mod common;
|
||||
|
||||
/// Helper function that concatenates the error message from
|
||||
|
|
|
@ -8,6 +8,7 @@ use std::cell::Cell;
|
|||
use std::sync::atomic::{AtomicBool, Ordering};
|
||||
use std::sync::Arc;
|
||||
|
||||
#[path = "../src/tests/common.rs"]
|
||||
mod common;
|
||||
|
||||
#[pyclass(freelist = 2)]
|
||||
|
|
|
@ -6,6 +6,7 @@ use pyo3::prelude::*;
|
|||
use pyo3::py_run;
|
||||
use pyo3::types::{IntoPyDict, PyList};
|
||||
|
||||
#[path = "../src/tests/common.rs"]
|
||||
mod common;
|
||||
|
||||
#[pyclass]
|
||||
|
|
|
@ -5,6 +5,7 @@ use pyo3::py_run;
|
|||
|
||||
use pyo3::types::IntoPyDict;
|
||||
|
||||
#[path = "../src/tests/common.rs"]
|
||||
mod common;
|
||||
|
||||
#[pyclass(subclass)]
|
||||
|
|
|
@ -4,7 +4,7 @@ use pyo3::prelude::*;
|
|||
use pyo3::types::IntoPyDict;
|
||||
|
||||
#[macro_use]
|
||||
#[path = "common.rs"]
|
||||
#[path = "../src/tests/common.rs"]
|
||||
mod common;
|
||||
|
||||
#[pyclass]
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
use pyo3::prelude::*;
|
||||
|
||||
#[macro_use]
|
||||
#[path = "../src/tests/common.rs"]
|
||||
mod common;
|
||||
|
||||
macro_rules! make_struct_using_macro {
|
||||
|
|
|
@ -10,6 +10,7 @@ use pyo3::types::PyList;
|
|||
use pyo3::types::PyMapping;
|
||||
use pyo3::types::PySequence;
|
||||
|
||||
#[path = "../src/tests/common.rs"]
|
||||
mod common;
|
||||
|
||||
#[pyclass(mapping)]
|
||||
|
|
|
@ -5,6 +5,7 @@ use pyo3::py_run;
|
|||
use pyo3::types::{IntoPyDict, PyDict, PyList, PySet, PyString, PyTuple, PyType};
|
||||
use pyo3::PyCell;
|
||||
|
||||
#[path = "../src/tests/common.rs"]
|
||||
mod common;
|
||||
|
||||
#[pyclass]
|
||||
|
|
|
@ -4,6 +4,8 @@ use pyo3::prelude::*;
|
|||
|
||||
use pyo3::py_run;
|
||||
use pyo3::types::{IntoPyDict, PyDict, PyTuple};
|
||||
|
||||
#[path = "../src/tests/common.rs"]
|
||||
mod common;
|
||||
|
||||
#[pyclass]
|
||||
|
|
|
@ -4,6 +4,7 @@ use pyo3::prelude::*;
|
|||
use pyo3::types::PyType;
|
||||
|
||||
#[macro_use]
|
||||
#[path = "../src/tests/common.rs"]
|
||||
mod common;
|
||||
|
||||
#[pyclass]
|
||||
|
|
|
@ -5,6 +5,7 @@ use pyo3::types::{PyDict, PyList, PyMapping, PySequence, PySlice, PyType};
|
|||
use pyo3::{prelude::*, py_run, PyCell};
|
||||
use std::{isize, iter};
|
||||
|
||||
#[path = "../src/tests/common.rs"]
|
||||
mod common;
|
||||
|
||||
#[pyclass]
|
||||
|
|
|
@ -11,6 +11,7 @@ use pyo3::types::PyDateTime;
|
|||
use pyo3::types::PyFunction;
|
||||
use pyo3::types::{self, PyCFunction};
|
||||
|
||||
#[path = "../src/tests/common.rs"]
|
||||
mod common;
|
||||
|
||||
#[pyfunction(signature = (arg = true))]
|
||||
|
|
|
@ -6,6 +6,7 @@ use pyo3::types::{PyBytes, PyString};
|
|||
use pyo3::PyCell;
|
||||
use std::collections::HashMap;
|
||||
|
||||
#[path = "../src/tests/common.rs"]
|
||||
mod common;
|
||||
|
||||
/// Assumes it's a file reader or so.
|
||||
|
|
|
@ -6,6 +6,7 @@ use pyo3::{ffi, prelude::*};
|
|||
|
||||
use pyo3::py_run;
|
||||
|
||||
#[path = "../src/tests/common.rs"]
|
||||
mod common;
|
||||
|
||||
#[pyclass]
|
||||
|
|
|
@ -6,6 +6,7 @@ use pyo3::types::IntoPyDict;
|
|||
|
||||
use pyo3::py_run;
|
||||
|
||||
#[path = "../src/tests/common.rs"]
|
||||
mod common;
|
||||
|
||||
#[pyclass]
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
use pyo3::prelude::*;
|
||||
|
||||
#[path = "../src/tests/common.rs"]
|
||||
mod common;
|
||||
|
||||
#[pyfunction]
|
||||
|
|
|
@ -4,6 +4,7 @@ use pyo3::prelude::*;
|
|||
use pyo3::types::{PyDict, PyTuple};
|
||||
use pyo3::{types::PyType, wrap_pymodule, PyCell};
|
||||
|
||||
#[path = "../src/tests/common.rs"]
|
||||
mod common;
|
||||
|
||||
#[test]
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
use pyo3::prelude::*;
|
||||
use pyo3::types::{PyDict, PyTuple};
|
||||
|
||||
#[path = "../src/tests/common.rs"]
|
||||
mod common;
|
||||
|
||||
#[pyclass]
|
||||
|
|
|
@ -6,6 +6,7 @@ use pyo3::{py_run, PyCell};
|
|||
|
||||
use std::fmt;
|
||||
|
||||
#[path = "../src/tests/common.rs"]
|
||||
mod common;
|
||||
|
||||
#[pyclass]
|
||||
|
|
Loading…
Reference in New Issue