File: test_relativepath.py

package info (click to toggle)
organize 3.3.0-1.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,540 kB
  • sloc: python: 5,837; makefile: 4
file content (15 lines) | stat: -rw-r--r-- 326 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from conftest import make_files

from organize import Config


def test_relative_path(fs):
    make_files(["test.txt"], "test")
    conf = """
    rules:
      - locations: /test
        actions:
          - move: "/other/path/"
          - echo: "{relative_path}"
    """
    Config.from_string(conf).execute(simulate=False)