diff options
Diffstat (limited to 'unittests')
| -rw-r--r-- | unittests/baseplatformtests.py | 4 | ||||
| -rw-r--r-- | unittests/internaltests.py | 18 |
2 files changed, 11 insertions, 11 deletions
diff --git a/unittests/baseplatformtests.py b/unittests/baseplatformtests.py index 251c15d35..489e5c428 100644 --- a/unittests/baseplatformtests.py +++ b/unittests/baseplatformtests.py @@ -229,8 +229,8 @@ class BasePlatformTests(TestCase): finally: # Close log file to satisfy Windows file locking mesonbuild.mlog.shutdown() - mesonbuild.mlog.log_dir = None - mesonbuild.mlog.log_file = None + mesonbuild.mlog._logger.log_dir = None + mesonbuild.mlog._logger.log_file = None if 'MESON_SKIP_TEST' in out: raise SkipTest('Project requested skipping.') diff --git a/unittests/internaltests.py b/unittests/internaltests.py index 720782e3d..aea68900d 100644 --- a/unittests/internaltests.py +++ b/unittests/internaltests.py @@ -947,23 +947,23 @@ class InternalTests(unittest.TestCase): def test_log_once(self): f = io.StringIO() - with mock.patch('mesonbuild.mlog.log_file', f), \ - mock.patch('mesonbuild.mlog._logged_once', set()): - mesonbuild.mlog.log_once('foo') - mesonbuild.mlog.log_once('foo') + with mock.patch('mesonbuild.mlog._logger.log_file', f), \ + mock.patch('mesonbuild.mlog._logger.logged_once', set()): + mesonbuild.mlog.log('foo', once=True) + mesonbuild.mlog.log('foo', once=True) actual = f.getvalue().strip() self.assertEqual(actual, 'foo', actual) def test_log_once_ansi(self): f = io.StringIO() - with mock.patch('mesonbuild.mlog.log_file', f), \ - mock.patch('mesonbuild.mlog._logged_once', set()): - mesonbuild.mlog.log_once(mesonbuild.mlog.bold('foo')) - mesonbuild.mlog.log_once(mesonbuild.mlog.bold('foo')) + with mock.patch('mesonbuild.mlog._logger.log_file', f), \ + mock.patch('mesonbuild.mlog._logger.logged_once', set()): + mesonbuild.mlog.log(mesonbuild.mlog.bold('foo'), once=True) + mesonbuild.mlog.log(mesonbuild.mlog.bold('foo'), once=True) actual = f.getvalue().strip() self.assertEqual(actual.count('foo'), 1, actual) - mesonbuild.mlog.log_once('foo') + mesonbuild.mlog.log('foo', once=True) actual = f.getvalue().strip() self.assertEqual(actual.count('foo'), 1, actual) |
