File: test_tool_detection.py

package info (click to toggle)
ros-catkin-pkg 1.1.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 776 kB
  • sloc: python: 4,704; xml: 183; makefile: 36
file content (18 lines) | stat: -rw-r--r-- 601 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import os

from catkin_pkg.tool_detection import get_previous_tool_used_on_the_space
from catkin_pkg.tool_detection import mark_space_as_built_by

from .util import in_temporary_directory


@in_temporary_directory
def test_get_previous_tool_used_on_the_space():
    res = get_previous_tool_used_on_the_space('folder_that_does_not_exist')
    assert res is None, res
    os.makedirs('build')
    res = get_previous_tool_used_on_the_space('build')
    assert res is None, res
    mark_space_as_built_by('build', 'foo')
    res = get_previous_tool_used_on_the_space('build')
    assert res == 'foo', res