nautilus_test_kit/python/mod.rs
1// -------------------------------------------------------------------------------------------------
2// Copyright (C) 2015-2025 Nautech Systems Pty Ltd. All rights reserved.
3// https://nautechsystems.io
4//
5// Licensed under the GNU Lesser General Public License Version 3.0 (the "License");
6// You may not use this file except in compliance with the License.
7// You may obtain a copy of the License at https://www.gnu.org/licenses/lgpl-3.0.en.html
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14// -------------------------------------------------------------------------------------------------
15
16// You may not use this file except in compliance with the License.
17// You may obtain a copy of the License at https://www.gnu.org/licenses/lgpl-3.0.en.html
18//
19// Unless required by applicable law or agreed to in writing, software
20// distributed under the License is distributed on an "AS IS" BASIS,
21// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22// See the License for the specific language governing permissions and
23// limitations under the License.
24// -------------------------------------------------------------------------------------------------
25
26//! Nautilus core test kit from `pyo3`.
27
28pub mod files;
29
30use pyo3::{prelude::*, wrap_pyfunction};
31
32/// Loaded as nautilus_pyo3.test_kit
33///
34/// # Errors
35///
36/// Returns a `PyErr` if registering any module components fails.
37#[pymodule]
38pub fn test_kit(_: Python<'_>, m: &Bound<'_, PyModule>) -> PyResult<()> {
39 m.add_function(wrap_pyfunction!(
40 files::py_ensure_file_exists_or_download_http,
41 m
42 )?)?;
43 Ok(())
44}