Skip to content

Two failures on openSUSE #8

Description

@jayvdb

With the patch for #7 applied against the current release, I get the following two errors.

Maybe they have been fixed on master. I'll try that next..

[   67s] =================================== FAILURES ===================================
[   67s] ________________________ ColrToolTests.test_list_codes _________________________
[   67s] 
[   67s] self = <test.test_colr_tool.ColrToolTests testMethod=test_list_codes>
[   67s] 
[   67s]     def test_list_codes(self):
[   67s]         """ colr tool should list escape codes with --listcodes. """
[   67s]         cases = {
[   67s]             s: str(Colr('test', s))
[   67s]             for s in ('red', 'blue', 'green', 'white')
[   67s]         }
[   67s]         for name, s in cases.items():
[   67s]             argd = {'TEXT': s, '--listcodes': True}
[   67s]             self.assertMainIn(
[   67s]                 argd,
[   67s]                 stdout=name,
[   67s] >               msg='main() with --listcodes did not recognize an escape code.',
[   67s]             )
[   67s] 
[   67s] test/test_colr_tool.py:334: 
[   67s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
[   67s] test/testing_tools.py:694: in assertMainIn
[   67s]     msg='main() returned a non-zero exit status.',
[   67s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
[   67s] 
[   67s] self = <test.test_colr_tool.ColrToolTests testMethod=test_list_codes>, a = 1
[   67s] b = 0, msg = 'main() returned a non-zero exit status.'
[   67s] 
[   67s]     def assertEqual(self, a, b, msg=None):
[   67s]         if a == b:
[   67s]             return None
[   67s] >       raise self.failureException(_equality_msg('!=', a, b, msg=msg))
[   67s] E       AssertionError: 
[   67s] E         1 !=
[   67s] E         0
[   67s] E       
[   67s] E       main() returned a non-zero exit status.
[   67s] 
[   67s] test/testing_tools.py:417: AssertionError
[   67s] __________________________ ColrToolTests.test_styles ___________________________
[   67s] 
[   67s] self = <test.test_colr_tool.ColrToolTests testMethod=test_styles>
[   67s] 
[   67s]     def test_styles(self):
[   67s]         """ colr tool should recognize styles. """
[   67s]         argd = {'TEXT': 'Hello World', 'FORE': '235', 'STYLE': 'normal'}
[   67s]         for _ in range(10):
[   67s]             argd['STYLE'] = r.choice(self.valid_style_vals)
[   67s]             self.assertMain(argd, msg='main() failed with valid style arg.')
[   67s]         # Invalid style values should raise a InvalidStyle.
[   67s]         badargsets = (
[   67s]             {'STYLE': 'dimmer'},
[   67s]             {'STYLE': 'x'},
[   67s]         )
[   67s]         for argset in badargsets:
[   67s]             argd.update(argset)
[   67s]             with self.assertRaises(InvalidStyle):
[   67s] >               self.run_main_test(argd, should_fail=True)
[   67s] E               AssertionError: InvalidStyle not raised
[   67s] 
[   67s] test/test_colr_tool.py:427: AssertionError

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions