Beispiel #1
0
def test_cwd_in_path__already_in_path():
    with patch('os.getcwd') as getcwd:
        getcwd.return_value = 'bar'
        with patch('sys.path', ['foo', 'bar', 'baz']):
            with cwd_in_path():
                assert 'bar' in sys.path
            assert 'bar' in sys.path
Beispiel #2
0
def test_cwd_in_path__already_in_path():
    with patch("os.getcwd") as getcwd:
        getcwd.return_value = "bar"
        with patch("sys.path", ["foo", "bar", "baz"]):
            with cwd_in_path():
                assert "bar" in sys.path
            assert "bar" in sys.path