test_ros_pytest.py
Go to the documentation of this file.
1 # -*- coding: utf-8 -*-
2 import pytest
3 
4 import ros_pytest
5 
6 
8  output = ros_pytest.get_output_file(['runner.py', '--gtest_output=xml:~/junit_output.xml'])
9 
10  assert output == '~/junit_output.xml'
11 
12 
14  with pytest.raises(RuntimeError):
15  ros_pytest.get_output_file(['main.py', '--file', 'random.txt'])
16 
17 
19  args = ros_pytest.create_cache_dir_args("3.0.1", "/tmp/output_file.xml")
20 
21  assert args == ['-p', 'no:cacheprovider']
22 
23 
25  args = ros_pytest.create_cache_dir_args("3.5.0", "/tmp/output_file.xml")
26 
27  assert args == ['--rootdir=/tmp']
def test_output_file_is_correctly_extracted_from_argv()
def test_not_passing_output_file_throws_runtime_error()
def create_cache_dir_args(version, output_file)
Definition: __init__.py:16
def get_output_file(argv)
Definition: __init__.py:8
def test_caching_is_disabled_for_older_pytest_versions()
def test_rootdir_is_set_for_newer_pytest_versions()


ros_pytest
Author(s):
autogenerated on Mon Jun 10 2019 14:42:05