From ac6d4338cce68f5040825fb9bfb95dd147390e76 Mon Sep 17 00:00:00 2001 From: Jon Turney Date: Sun, 4 Nov 2018 13:34:48 +0000 Subject: Make use of get_argument_syntax() in another test case --- run_unittests.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'run_unittests.py') diff --git a/run_unittests.py b/run_unittests.py index 00bf504..8aa0425 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -3100,9 +3100,14 @@ class WindowsTests(BasePlatformTests): self.utime(os.path.join(testdir, 'res', 'resource.h')) self.assertRebuiltTarget('prog_1') - @unittest.skipIf(shutil.which('cl') is None, 'Test only applies to VS') def test_msvc_cpp17(self): testdir = os.path.join(self.unit_test_dir, '45 vscpp17') + + env = get_fake_env(testdir, self.builddir, self.prefix) + cc = env.detect_c_compiler(False) + if cc.get_argument_syntax() != 'msvc': + raise unittest.SkipTest('Test only applies to MSVC-like compilers') + try: self.init(testdir) except subprocess.CalledProcessError: -- cgit v1.1