tests/common.rs -> src/tests/common.rs

This commit is contained in:
David Hewitt 2023-09-24 13:34:53 +01:00
parent c8f82be32c
commit 7d486bb72a
31 changed files with 31 additions and 2 deletions

View File

@ -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

View File

@ -4,6 +4,7 @@ use pyo3::class::basic::CompareOp;
use pyo3::prelude::*;
use pyo3::py_run;
#[path = "../src/tests/common.rs"]
mod common;
#[pyclass]

View File

@ -9,6 +9,7 @@ use std::{
};
#[macro_use]
#[path = "../src/tests/common.rs"]
mod common;
enum TestGetBufferError {

View File

@ -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]

View File

@ -3,6 +3,7 @@
use pyo3::prelude::*;
use pyo3::types::PyBytes;
#[path = "../src/tests/common.rs"]
mod common;
#[pyfunction]

View File

@ -2,6 +2,7 @@
use pyo3::prelude::*;
#[path = "../src/tests/common.rs"]
mod common;
#[pyclass]

View File

@ -4,6 +4,7 @@ use pyo3::prelude::*;
use pyo3::types::PyType;
use pyo3::{py_run, PyClass};
#[path = "../src/tests/common.rs"]
mod common;
#[pyclass]

View File

@ -4,6 +4,7 @@ use pyo3::prelude::*;
use pyo3::ToPyObject;
#[macro_use]
#[path = "../src/tests/common.rs"]
mod common;
#[pyclass]

View File

@ -2,6 +2,7 @@
use pyo3::prelude::*;
#[path = "../src/tests/common.rs"]
mod common;
// Test default generated __repr__.

View File

@ -3,6 +3,7 @@
use pyo3::prelude::*;
use pyo3::{py_run, wrap_pyfunction};
#[path = "../src/tests/common.rs"]
mod common;
#[pyclass]

View File

@ -7,6 +7,7 @@ use std::fmt;
#[cfg(not(target_os = "windows"))]
use std::fs::File;
#[path = "../src/tests/common.rs"]
mod common;
#[pyfunction]

View File

@ -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

View File

@ -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)]

View File

@ -6,6 +6,7 @@ use pyo3::prelude::*;
use pyo3::py_run;
use pyo3::types::{IntoPyDict, PyList};
#[path = "../src/tests/common.rs"]
mod common;
#[pyclass]

View File

@ -5,6 +5,7 @@ use pyo3::py_run;
use pyo3::types::IntoPyDict;
#[path = "../src/tests/common.rs"]
mod common;
#[pyclass(subclass)]

View File

@ -4,7 +4,7 @@ use pyo3::prelude::*;
use pyo3::types::IntoPyDict;
#[macro_use]
#[path = "common.rs"]
#[path = "../src/tests/common.rs"]
mod common;
#[pyclass]

View File

@ -5,6 +5,7 @@
use pyo3::prelude::*;
#[macro_use]
#[path = "../src/tests/common.rs"]
mod common;
macro_rules! make_struct_using_macro {

View File

@ -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)]

View File

@ -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]

View File

@ -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]

View File

@ -4,6 +4,7 @@ use pyo3::prelude::*;
use pyo3::types::PyType;
#[macro_use]
#[path = "../src/tests/common.rs"]
mod common;
#[pyclass]

View File

@ -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]

View File

@ -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))]

View File

@ -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.

View File

@ -6,6 +6,7 @@ use pyo3::{ffi, prelude::*};
use pyo3::py_run;
#[path = "../src/tests/common.rs"]
mod common;
#[pyclass]

View File

@ -6,6 +6,7 @@ use pyo3::types::IntoPyDict;
use pyo3::py_run;
#[path = "../src/tests/common.rs"]
mod common;
#[pyclass]

View File

@ -2,6 +2,7 @@
use pyo3::prelude::*;
#[path = "../src/tests/common.rs"]
mod common;
#[pyfunction]

View File

@ -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]

View File

@ -3,6 +3,7 @@
use pyo3::prelude::*;
use pyo3::types::{PyDict, PyTuple};
#[path = "../src/tests/common.rs"]
mod common;
#[pyclass]

View File

@ -6,6 +6,7 @@ use pyo3::{py_run, PyCell};
use std::fmt;
#[path = "../src/tests/common.rs"]
mod common;
#[pyclass]