1 """Tests for distutils.emxccompiler."""
7 from test
.test_support
import check_warnings
8 from test
.test_support
import captured_stdout
10 from distutils
.emxccompiler
import get_versions
11 from distutils
.util
import get_compiler_versions
12 from distutils
.tests
import support
14 class EmxCCompilerTestCase(support
.TempdirManager
,
17 def test_get_version_deprecated(self
):
18 with
check_warnings() as w
:
19 warnings
.simplefilter("always")
20 # make sure get_compiler_versions and get_versions
21 # returns the same gcc
22 gcc
, ld
, dllwrap
= get_compiler_versions()
23 emx_gcc
, emx_ld
= get_versions()
24 self
.assertEquals(gcc
, emx_gcc
)
26 # make sure using get_version() generated a warning
27 self
.assertEquals(len(w
.warnings
), 1)
30 return unittest
.makeSuite(EmxCCompilerTestCase
)
32 if __name__
== '__main__':
33 test_support
.run_unittest(test_suite())