def test_invalid_unicode_in_build_file(self):
    'Demonstrate that unicode characters causing parse errors raise real parse errors.'
    self.add_to_build_file('BUILD', dedent("\n      jvm_binary(name = ‘hello’,  # Parse error due to smart quotes (non ascii characters)\n        source = 'HelloWorld.java'\n        main = 'foo.HelloWorld',\n      )\n      "))
    build_file = self.create_buildfile('BUILD')
    self.assert_parser_error(build_file, ('invalid character' if PY3 else 'invalid syntax'))
Demonstrate that unicode characters causing parse errors raise real parse errors.
def test_invalid_unicode_in_build_file(self):
    
    self.add_to_build_file('BUILD', dedent("\n      jvm_binary(name = ‘hello’,  # Parse error due to smart quotes (non ascii characters)\n        source = 'HelloWorld.java'\n        main = 'foo.HelloWorld',\n      )\n      "))
    build_file = self.create_buildfile('BUILD')
    self.assert_parser_error(build_file, ('invalid character' if PY3 else 'invalid syntax'))