Skip to content

Commit 69f77c6

Browse files
committed
Fixing failing test: To fix: we should not expect empty strings at all.
1 parent 2767862 commit 69f77c6

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

about_code_tool/tests/test_about.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# limitations under the License.
1515
# =============================================================================
1616

17-
from __future__ import print_function, with_statement # We require Python 2.6 or later
17+
from __future__ import print_function, with_statement # We require Python 2.6 or later
1818

1919
import sys
2020
import string
@@ -538,7 +538,7 @@ def test_generate_attribution(self):
538538
self.assertEqual(result, expected)
539539

540540
def test_license_text_extracted_from_license_text_file(self):
541-
expected ='''Tester holds the copyright for test component. Tester relinquishes copyright of
541+
expected = '''Tester holds the copyright for test component. Tester relinquishes copyright of
542542
this software and releases the component to Public Domain.
543543
544544
* Email [email protected] for any questions'''
@@ -548,7 +548,7 @@ def test_license_text_extracted_from_license_text_file(self):
548548
self.assertEqual(license_text, expected)
549549

550550
def test_notice_text_extacted_from_notice_text_file(self):
551-
expected ='''Test component is released to Public Domain.'''
551+
expected = '''Test component is released to Public Domain.'''
552552
about_file = about.AboutFile(join(TESTDATA_PATH, 'attrib/license_text.ABOUT'))
553553
notice_text = about_file.notice_text()
554554
self.assertEqual(notice_text, expected)
@@ -581,16 +581,16 @@ def test_get_license_text_file_name(self):
581581
expected = 'httpd.LICENSE'
582582
about_file = about.AboutFile(join(TESTDATA_PATH, 'parser_tests/about_resource_field_present.ABOUT'))
583583
output = about_file.get_license_text_file_name()
584-
self.assertTrue(output == expected)
584+
self.assertEquals(expected, output)
585585

586586
def test_get_license_text_file_name_no_value(self):
587587
expected = ''
588588
about_file = about.AboutFile(join(TESTDATA_PATH, 'parser_tests/about_file_empty_value_for_dje_license_license_text_file.ABOUT'))
589589
output = about_file.get_license_text_file_name()
590-
self.assertTrue(output == expected)
590+
self.assertEquals(expected, output)
591591

592592
def test_get_license_text_file_name_no_key(self):
593-
expected = None
593+
expected = ''
594594
about_file = about.AboutFile(join(TESTDATA_PATH, 'parser_tests/about_file_no_dje_license_no_license_text_file_keys.ABOUT'))
595595
output = about_file.get_license_text_file_name()
596-
self.assertTrue(output == expected)
596+
self.assertEquals(expected, output)

0 commit comments

Comments
 (0)