Skip to content

Commit cc61d27

Browse files
committed
Test
1 parent 8cb9006 commit cc61d27

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/attributecode/attrib.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ def generate(abouts, template=None, variables=None):
7474
if about.license_file:
7575
# We want to create a dictionary which have the license short name as
7676
# the key and license text as the value
77+
print("##################################################")
78+
print(about.license_file)
7779
for license_text_name in about.license_file.value:
7880
if not license_text_name in captured_license:
7981
captured_license.append(license_text_name)
@@ -84,6 +86,8 @@ def generate(abouts, template=None, variables=None):
8486
license_key_and_context[license_key] = about.license_file.value[license_text_name]
8587
sorted_license_key_and_context = collections.OrderedDict(sorted(license_key_and_context.items()))
8688
license_file_name_and_key[license_text_name] = license_key
89+
print("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! LIC KEY AND CONTEXT")
90+
print(license_key_and_context)
8791

8892
# Convert/map the key in license expression to license name
8993
if about.license_expression.value and about.license_name.value:
@@ -117,6 +121,8 @@ def generate(abouts, template=None, variables=None):
117121

118122
# Get the current UTC time
119123
utcnow = datetime.datetime.utcnow()
124+
print("$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ BEFORE Render")
125+
print(license_key_and_context)
120126
rendered = template.render(
121127
abouts=abouts, common_licenses=COMMON_LICENSES,
122128
license_key_and_context=sorted_license_key_and_context,

tests/test_attrib.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,6 @@ def test_lic_key_name_sync(self):
116116
output_file = get_temp_file()
117117

118118
errors, abouts = model.collect_inventory(test_file)
119-
print("################################################3")
120-
print(abouts)
121119
attrib.generate_and_save(abouts, output_file, template_loc)
122120

123121
with open(output_file) as of:
@@ -126,6 +124,7 @@ def test_lic_key_name_sync(self):
126124
f2 = '\n'.join(ef.readlines(False))
127125

128126
assert f1 == f2
127+
assert 1 == 2
129128

130129
def remove_timestamp(html_text):
131130
"""

0 commit comments

Comments
 (0)