Skip to content

Commit

Permalink
Fix locale test failing on Python 3.7 due to forced UTF-8 mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric-Arellano committed Mar 21, 2019
1 parent e60e665 commit 9986a78
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions tests/python/pants_test/bin/test_loader_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,18 @@
class LoaderIntegrationTest(PantsRunIntegrationTest):
def test_invalid_locale(self):
bypass_env = PantsLoader.ENCODING_IGNORE_ENV_VAR
pants_run = self.run_pants(command=['help'], extra_env={'LC_ALL': 'iNvALiD-lOcALe'})
pants_run = self.run_pants(
command=['help'],
extra_env={'LC_ALL': 'iNvALiD-lOcALe', "PYTHONUTF8": "0"}
)
self.assert_failure(pants_run)
self.assertIn('Pants requires', pants_run.stderr_data)
self.assertIn(bypass_env, pants_run.stderr_data)

pants_run = self.run_pants(command=['help'], extra_env={'LC_ALL': 'iNvALiD-lOcALe',
bypass_env: '1'})
pants_run = self.run_pants(
command=['help'],
extra_env={'LC_ALL': 'iNvALiD-lOcALe', "PYTHONUTF8": "0", bypass_env: '1'}
)
self.assert_success(pants_run)

def test_alternate_entrypoint(self):
Expand Down

0 comments on commit 9986a78

Please sign in to comment.