Skip to content

Commit b2068e3

Browse files
authored
Merge pull request #4 from quadbio/tests/coverage
Tests/coverage
2 parents 4dc082b + 260c2cc commit b2068e3

File tree

2 files changed

+22
-3
lines changed

2 files changed

+22
-3
lines changed

CHANGELOG.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,5 @@ and this project adheres to [Semantic Versioning][].
1010

1111
## [Unreleased]
1212

13-
### Added
14-
15-
- Basic tool, preprocessing and plotting functions
13+
## [v0.1.0]
14+
Initial package release.

tests/test_cellmapper.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,23 @@ def test_evaluate_expression_transfer_layers_and_methods(self, cmap, eval_layer,
4646
metrics = cmap.expression_transfer_metrics
4747
assert metrics["method"] == method
4848
assert metrics["n_valid_genes"] > 0
49+
50+
@pytest.mark.parametrize(
51+
"joint_pca_key,n_pca_components,pca_kwargs",
52+
[
53+
("pca_joint", 10, {}),
54+
("custom_pca", 5, {"svd_solver": "arpack"}),
55+
],
56+
)
57+
def test_compute_neighbors_joint_pca(self, cmap, joint_pca_key, n_pca_components, pca_kwargs):
58+
cmap.compute_neighbors(
59+
n_neighbors=3,
60+
use_rep=None,
61+
joint_pca_key=joint_pca_key,
62+
n_pca_components=n_pca_components,
63+
pca_kwargs=pca_kwargs,
64+
)
65+
assert joint_pca_key in cmap.ref.obsm
66+
assert joint_pca_key in cmap.query.obsm
67+
assert cmap.ref.obsm[joint_pca_key].shape[1] == n_pca_components
68+
assert cmap.query.obsm[joint_pca_key].shape[1] == n_pca_components

0 commit comments

Comments
 (0)