Bug 1706197 - Avoid Python version dependent line number issues r=firefox-build-system-reviewers,glandium

Differential Revision: https://phabricator.services.mozilla.com/D112760
This commit is contained in:
Steve Fink 2021-04-22 14:30:49 +00:00
parent a2163940a6
commit 768eac28f5

View File

@ -407,11 +407,11 @@ class TestLint(unittest.TestCase):
"""
):
self.lint_test()
with self.assertRaisesFromLine(ConfigureError, 4) as e:
with self.assertRaisesFromLine(ConfigureError, 3) as e:
with self.moz_configure(
"""
option(env='FOO', help='foo')
option('--enable-bar', default=depends('FOO')(lambda x: bool(x)),
option('--enable-bar', default=depends('FOO')(lambda x: bool(x)),\
help='Enable bar')
"""
):
@ -423,14 +423,14 @@ class TestLint(unittest.TestCase):
)
def test_large_offset(self):
with self.assertRaisesFromLine(ConfigureError, 376):
with self.assertRaisesFromLine(ConfigureError, 375):
with self.moz_configure(
"""
option(env='FOO', help='foo')
"""
+ "\n" * 371
+ """
option('--enable-bar', default=depends('FOO')(lambda x: bool(x)),
option('--enable-bar', default=depends('FOO')(lambda x: bool(x)),\
help='Enable bar')
"""
):