diff options
author | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2019-03-15 00:00:00 +0000 |
---|---|---|
committer | Christoph Reiter <reiter.christoph@gmail.com> | 2019-03-15 13:35:17 +0100 |
commit | 9d97aee50f2f25636ef268b11909b3d1d9450bf4 (patch) | |
tree | 25ba31d14d3b1615a8087eab6ff8bb30869532d5 /tests/scanner/test_ccompiler.py | |
parent | 93b39196091cc2cf9b61d8401eaeef3e812761d5 (diff) | |
download | gobject-introspection-9d97aee50f2f25636ef268b11909b3d1d9450bf4.tar.gz |
tests: Fix compatibility with Python 3.5
Use call_count to verify the number of calls. This replaces
assert_called_once used previously, which is only available
since Python 3.6.
Fixes issue #274.
Diffstat (limited to 'tests/scanner/test_ccompiler.py')
-rw-r--r-- | tests/scanner/test_ccompiler.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/scanner/test_ccompiler.py b/tests/scanner/test_ccompiler.py index dd8700d8..5890aa9b 100644 --- a/tests/scanner/test_ccompiler.py +++ b/tests/scanner/test_ccompiler.py @@ -85,7 +85,7 @@ class UnixCCompilerTest(unittest.TestCase): # Don't actually do anything. cc.compiler.dry_run = True cc.compile(pkg_config_cflags, cpp_includes, [source], init_sections) - spawn.assert_called_once() + self.assertEqual(1, spawn.call_count) args, kwargs = spawn.call_args return args[0] @@ -106,7 +106,7 @@ class UnixCCompilerTest(unittest.TestCase): # Don't actually do anything. cc.compiler.dry_run = True cc.preprocess(source, output, cpp_options) - spawn.assert_called_once() + self.assertEqual(1, spawn.call_count) args, kwargs = spawn.call_args return args[0] |