Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ShellCheckBear tests fail on Windows #2920

Open
jayvdb opened this issue Jun 10, 2019 · 0 comments
Open

ShellCheckBear tests fail on Windows #2920

jayvdb opened this issue Jun 10, 2019 · 0 comments

Comments

@jayvdb
Copy link
Member

jayvdb commented Jun 10, 2019

ShellCheck is emitting an extra result on Windows, breaking the tests.

__________________ SmallFileTest.test_valid_files ________________________
self = <coalib.testing.LocalBearTestHelper.LocalBearTest testMethod=test_valid_files>
    def test_valid_files(self):
        self.assertIsInstance(valid_files, (list, tuple))
        for file in valid_files:
            self.check_validity(self.uut,
                                file.splitlines(keepends=True),
                                filename,
                                valid=True,
                                force_linebreaks=force_linebreaks,
                                create_tempfile=create_tempfile,
>                               tempfile_kwargs=tempfile_kwargs)
.tox\py34-pip-npm-gem-go-perl-php-java8-adhoc-win-check-noskip\lib\site-packages\coalib\testing\LocalBearTestHelper.py:401: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox\py34-pip-npm-gem-go-perl-php-java8-adhoc-win-check-noskip\lib\site-packages\coalib\testing\LocalBearTestHelper.py:174: in check_validity
    aspects=aspects,
.tox\py34-pip-npm-gem-go-perl-php-java8-adhoc-win-check-noskip\lib\site-packages\coalib\testing\LocalBearTestHelper.py:287: in check_results
    self.assertComparableObjectsEqual(bear_output, results)
.tox\py34-pip-npm-gem-go-perl-php-java8-adhoc-win-check-noskip\lib\site-packages\coalib\testing\LocalBearTestHelper.py:138: in assertComparableObjectsEqual
    self.assertEqual(observed_result, expected_result)
E   AssertionError: Lists differ: [<Result object(id=0x1dc6381484ed4c51aa434[494 chars]5b0>] != []
E   
E   First list contains 1 additional elements.
E   First extra element 0:
E   <Result object(id=0x1dc6381484ed4c51aa43403357d07624, origin='ShellCheckBear', affected_code=(<SourceRange object(start=<SourcePosition object(file='C:\\Users\\appveyor\\AppData\\Local\\Temp\\tmp2ihvhxxq', line=1, column=1) at 0x82f6eb0>, end=<SourcePosition object(file='C:\\Users\\appveyor\\AppData\\Local\\Temp\\tmp2ihvhxxq', line=1, column=1) at 0x82f6210>) at 0x82f6310>,), severity=MAJOR, confidence=100, message="Literal carriage return. Run script through tr -d '\\r' . [SC1017]", aspect=NoneType, applied_actions={}) at 0x82f65b0>
E   ...:174: in check_validity
....
E   - [<Result object(id=0x1dc6381484ed4c51aa43403357d07624, origin='ShellCheckBear', affected_code=(<SourceRange object(start=<SourcePosition object(file='C:\\Users\\appveyor\\AppData\\Local\\Temp\\tmp2ihvhxxq', line=1, column=1) at 0x82f6eb0>, end=<SourcePosition object(file='C:\\Users\\appveyor\\AppData\\Local\\Temp\\tmp2ihvhxxq', line=1, column=1) at 0x82f6210>) at 0x82f6310>,), severity=MAJOR, confidence=100, message="Literal carriage return. Run script through tr -d '\\r' . [SC1017]", aspect=NoneType, applied_actions={}) at 0x82f65b0>]
E   + []
---------------------------- Captured stdout call -----------------------------
ShellCheckBear: No output; skipping processing
ShellCheckBear: Exit code 1
tests\shell\ShellCheckBearTest.py ....F
_____________________ ShellCheckBearTest.test_valid_files _____________________
self = <coalib.testing.LocalBearTestHelper.LocalBearTest testMethod=test_valid_files>
    def test_valid_files(self):
        self.assertIsInstance(valid_files, (list, tuple))
        for file in valid_files:
            self.check_validity(self.uut,
                                file.splitlines(keepends=True),
                                filename,
                                valid=True,
                                force_linebreaks=force_linebreaks,
                                create_tempfile=create_tempfile,
>                               tempfile_kwargs=tempfile_kwargs)
.tox\py34-pip-npm-gem-go-perl-php-java8-adhoc-win-check-noskip\lib\site-packages\coalib\testing\LocalBearTestHelper.py:401: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox\py34-pip-npm-gem-go-perl-php-java8-adhoc-win-check-noskip\lib\site-packages\coalib\testing\LocalBearTestHelper.py    aspects=aspects,
.tox\py34-pip-npm-gem-go-perl-php-java8-adhoc-win-check-noskip\lib\site-packages\coalib\testing\LocalBearTestHelper.py:287: in check_results
    self.assertComparableObjectsEqual(bear_output, results)
.tox\py34-pip-npm-gem-go-perl-php-java8-adhoc-win-check-noskip\lib\site-packages\coalib\testing\LocalBearTestHelper.py:138: in assertComparableObjectsEqual
    self.assertEqual(observed_result, expected_result)
E   AssertionError: Lists differ: [<Result object(id=0x2f9f84f76ba428a98b56e[2677 chars]310>] != []
E   
E   First list contains 5 additional elements.
E   First extra element 0:
E   <Result object(id=0x2f9f84f76ba428a98b56e4cc893067d, origin='ShellCheckBear', affected_code=(<SourceRange object(start=<SourcePosition object(file='C:\\Users\\appveyor\\AppData\\Local\\Temp\\tmpobgmucrz', line=1, column=1) at 0x7279430>, end=<SourcePosition object(file='C:\\Users\\appveyor\\AppData\\Local\\Temp\\tmpobgmucrz', line=1, column=1) at 0x7279170>) at 0x7279370>,), severity=MAJOR, confidence=100, message="Literal carriage return. Run script through tr -d '\\r' . [SC1017]", aspect=NoneType, applied_actions={}) at 0x7279e30>
E   
E   Diff is 2744 characters long. Set self.maxDiff to None to see it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant