Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion python_example/maketrees/tests/test_maketrees.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ def test_return_value():
assert ts.num_nodes == 3
assert ts.num_edges == 2
times = ts.tables.nodes.time
print(times)
assert len([i for i in times if i == 0.0]) == 2
assert len([i for i in times if i == 1.0]) == 1

Expand Down
7 changes: 6 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#![doc = include_str!("../README.md")]

#![deny(missing_docs)]
#![deny(rustdoc::broken_intra_doc_links)]

Expand Down Expand Up @@ -195,6 +194,7 @@ impl SharedTableCollection {
/// let pytables = holder.into_python_tables(py).unwrap();
/// pyo3::py_run!(py, pytables, "import tskit; assert isinstance(pytables,
/// tskit.TableCollection)");
/// pyo3::py_run!(py, pytables, "assert pytables.sequence_length == 100.0");
/// });
/// ```
pub fn into_python_tables(self, py: Python<'_>) -> Result<Py<PyAny>, Error> {
Expand All @@ -220,6 +220,11 @@ impl SharedTableCollection {
/// let pytreeseq = holder.into_python_tree_sequence(py).unwrap();
/// pyo3::py_run!(py, pytreeseq, "import tskit; assert isinstance(pytreeseq,
/// tskit.TreeSequence)");
/// pyo3::py_run!(py, pytreeseq, "assert pytreeseq.sequence_length == 100.0");
/// # pyo3::py_run!(py, pytreeseq, "assert pytreeseq.num_nodes == 0");
/// # pyo3::py_run!(py, pytreeseq, "assert pytreeseq.num_edges == 0");
/// # pyo3::py_run!(py, pytreeseq, "assert pytreeseq.num_sites == 0");
/// # pyo3::py_run!(py, pytreeseq, "assert pytreeseq.num_mutations == 0");
/// });
/// ```
pub fn into_python_tree_sequence(self, py: Python<'_>) -> Result<Py<PyAny>, Error> {
Expand Down
Loading