Beispiel #1
0
def test_mkdir_p(tmpdir):
    tmp_dir = str(tmpdir)
    assert os.path.isdir(tmp_dir)

    foo_bar_dir = os.path.join(tmp_dir, 'foo', 'bar')

    mkdir_p(foo_bar_dir)
    assert os.path.isdir(foo_bar_dir)

    # Make sure calling function twice does not raise an exception
    mkdir_p(foo_bar_dir)
    assert os.path.isdir(foo_bar_dir)
Beispiel #2
0
def test_mkdir_p(tmpdir):
    tmp_dir = str(tmpdir)
    assert os.path.isdir(tmp_dir)

    foo_bar_dir = os.path.join(tmp_dir, 'foo', 'bar')

    mkdir_p(foo_bar_dir)
    assert os.path.isdir(foo_bar_dir)

    # Make sure calling function twice does not raise an exception
    mkdir_p(foo_bar_dir)
    assert os.path.isdir(foo_bar_dir)
def test_cxx_compiler():

    # Create a unique subdirectory 'foo' that is expected to be removed.
    test_build_folder = os.path.join(test_folder, 'build', 'foo')
    mkdir_p(test_build_folder)

    generator = skbuild_platform.get_best_generator(languages=["CXX", "C"],
                                                    cleanup=False)
    # TODO: this isn't a true unit test.  It depends on the test CMakeLists.txt
    #       file having been written correctly.
    # with the known test file present, this tries to generate a makefile
    # (or solution, or whatever).
    # This test verifies that a working compiler is present on the system, but
    # doesn't actually compile anything.
    try:
        assert(generator is not None)
        assert not os.path.exists(test_build_folder)
    finally:
        skbuild_platform.cleanup_test()
Beispiel #4
0
def test_cxx_compiler():

    # Create a unique subdirectory 'foo' that is expected to be removed.
    test_build_folder = os.path.join(test_folder, 'build', 'foo')
    mkdir_p(test_build_folder)

    generator = skbuild_platform.get_best_generator(languages=["CXX", "C"],
                                                    cleanup=False)
    # TODO: this isn't a true unit test.  It depends on the test CMakeLists.txt
    #       file having been written correctly.
    # with the known test file present, this tries to generate a makefile
    # (or solution, or whatever).
    # This test verifies that a working compiler is present on the system, but
    # doesn't actually compile anything.
    try:
        assert(generator is not None)
        assert not os.path.exists(test_build_folder)
    finally:
        skbuild_platform.cleanup_test()