Skip to content

Commit 46bc1cf

Browse files
committed
wip
1 parent 9245377 commit 46bc1cf

2 files changed

Lines changed: 7 additions & 15 deletions

File tree

examples/containers/sample_example.py

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -562,22 +562,14 @@
562562
# #### Load a Sample from a directory via the Sample class
563563

564564
# %%
565-
new_sample = Sample.load_from_dir(sample_save_fname)
565+
new_sample_from_dir = Sample.load_from_dir(sample_save_fname)
566566

567-
print(sample.summarize())
568-
569-
# %% [markdown]
570-
# #### Load a Sample from a directory via the Sample class
571-
572-
# %%
573-
new_sample_2 = Sample.load_from_dir(test_pth / "test")
574-
575-
print(sample.summarize())
567+
print(new_sample_from_dir.summarize())
576568

577569
# %% [markdown]
578570
# #### Load the Sample from a directory via a Sample instance
579571

580572
# %%
581-
new_sample = Sample()
582-
new_sample.load(sample_save_fname)
583-
print(sample.summarize())
573+
new_sample_via_instance = Sample()
574+
new_sample_via_instance.load(sample_save_fname)
575+
print(new_sample_via_instance.summarize())

tests/containers/test_sample.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ def current_directory() -> Path:
178178

179179
class Test_Sample:
180180
# -------------------------------------------------------------------------#
181-
def test_load_from_dir(self, current_directory):
181+
def test_load_from_dir_multiple_samples(self, current_directory):
182182
sample_path_1 = (
183183
current_directory / "dataset_cgns" / "data" / "test" / "sample_000000000"
184184
)
@@ -1349,7 +1349,7 @@ def test_save(self, sample_with_tree_and_scalar, tmp_path):
13491349
save_dir, overwrite=True, memory_safe=True
13501350
)
13511351

1352-
def test_load_from_dir_2(self, sample_with_tree_and_scalar, tmp_path):
1352+
def test_load_from_dir(self, sample_with_tree_and_scalar, tmp_path):
13531353
save_dir = tmp_path / "test_dir"
13541354
sample_with_tree_and_scalar.save_to_dir(save_dir)
13551355
new_sample = Sample.load_from_dir(save_dir)

0 commit comments

Comments
 (0)