Skip to content

Commit

Permalink
Auto merge of #66396 - smmalis37:pythontest, r=alexcrichton
Browse files Browse the repository at this point in the history
Make a test compatible across python versions.

Progress on #65063

This PR allows this test to work on both python2 and python3, ~~and it also allows `./x.py test` to fully complete on my system without python2 installed at all.~~
  • Loading branch information
bors committed Nov 18, 2019
2 parents d67ca28 + 56f9212 commit 9966af3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def check_lib(lib):
print('verifying if {} is an unstable crate'.format(lib['name']))
stdout, stderr = exec_command([os.environ['RUSTC'], '-', '--crate-type', 'rlib',
'--extern', '{}={}'.format(lib['name'], lib['path'])],
to_input='extern crate {};'.format(lib['name']))
to_input=('extern crate {};'.format(lib['name'])).encode('utf-8'))
if not 'use of unstable library feature' in '{}{}'.format(stdout, stderr):
print('crate {} "{}" is not unstable'.format(lib['name'], lib['path']))
print('{}{}'.format(stdout, stderr))
Expand Down

0 comments on commit 9966af3

Please sign in to comment.