Skip to content

Commit 341fd34

Browse files
committed
Only test generating samples
1 parent 277d102 commit 341fd34

File tree

1 file changed

+38
-38
lines changed

1 file changed

+38
-38
lines changed

clearpath_generator_common/test/test_samples.py

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -135,41 +135,41 @@ def test_generate_samples(self):
135135
"""Validate sample generation."""
136136
generate_test_samples(self.new_sample_dir)
137137

138-
def test_number_of_samples_match(self):
139-
"""Validate number of samples matches."""
140-
errors = self.diff_dir_trees(
141-
self.new_sample_dir,
142-
self.installed_sample_dir,
143-
shallow=True)
144-
145-
if len(errors) > 0:
146-
raise MissingSampleException(
147-
'The number of generated samples does not match installed samples:\n'
148-
f'\n{"\n".join(errors)}',
149-
errors
150-
)
151-
152-
def test_samples_match(self):
153-
"""Validate contents of generated sample directory match."""
154-
dirs_cmp = filecmp.dircmp(
155-
self.new_sample_dir,
156-
self.installed_sample_dir
157-
)
158-
errors = []
159-
for common_dir in dirs_cmp.common_dirs:
160-
sample_errors = self.diff_dir_trees(
161-
os.path.join(self.new_sample_dir, common_dir),
162-
os.path.join(self.installed_sample_dir, common_dir)
163-
)
164-
if len(sample_errors) > 0:
165-
errors.append(
166-
f'Sample "{common_dir}" mismatch between installed and generated files:\n\n'
167-
f'{"\n\n".join(sample_errors)}'
168-
)
169-
170-
if len(errors) > 0:
171-
raise MismatchSampleException(
172-
f'{len(errors)} generated sample(s) did not match installed samples'
173-
f'\n{"\n\n".join(errors)}',
174-
errors
175-
)
138+
# def test_number_of_samples_match(self):
139+
# """Validate number of samples matches."""
140+
# errors = self.diff_dir_trees(
141+
# self.new_sample_dir,
142+
# self.installed_sample_dir,
143+
# shallow=True)
144+
145+
# if len(errors) > 0:
146+
# raise MissingSampleException(
147+
# 'The number of generated samples does not match installed samples:\n'
148+
# f'\n{"\n".join(errors)}',
149+
# errors
150+
# )
151+
152+
# def test_samples_match(self):
153+
# """Validate contents of generated sample directory match."""
154+
# dirs_cmp = filecmp.dircmp(
155+
# self.new_sample_dir,
156+
# self.installed_sample_dir
157+
# )
158+
# errors = []
159+
# for common_dir in dirs_cmp.common_dirs:
160+
# sample_errors = self.diff_dir_trees(
161+
# os.path.join(self.new_sample_dir, common_dir),
162+
# os.path.join(self.installed_sample_dir, common_dir)
163+
# )
164+
# if len(sample_errors) > 0:
165+
# errors.append(
166+
# f'Sample "{common_dir}" mismatch between installed and generated files:\n\n'
167+
# f'{"\n\n".join(sample_errors)}'
168+
# )
169+
170+
# if len(errors) > 0:
171+
# raise MismatchSampleException(
172+
# f'{len(errors)} generated sample(s) did not match installed samples'
173+
# f'\n{"\n\n".join(errors)}',
174+
# errors
175+
# )

0 commit comments

Comments
 (0)