File: test_dirmatch.py

package info (click to toggle)
virtualenv-clone 0.5.7-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 132 kB
  • sloc: python: 544; makefile: 4
file content (14 lines) | stat: -rw-r--r-- 765 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from unittest import TestCase
import clonevirtualenv

class TestVirtualenvDirmatch(TestCase):

    def test_dirmatch(self):
        assert clonevirtualenv._dirmatch('/home/foo/bar', '/home/foo/bar')
        assert clonevirtualenv._dirmatch('/home/foo/bar/', '/home/foo/bar')
        assert clonevirtualenv._dirmatch('/home/foo/bar/etc', '/home/foo/bar')
        assert clonevirtualenv._dirmatch('/home/foo/bar/etc/', '/home/foo/bar')
        assert not clonevirtualenv._dirmatch('/home/foo/bar2', '/home/foo/bar')
        assert not clonevirtualenv._dirmatch('/home/foo/bar2/etc', '/home/foo/bar')
        assert not clonevirtualenv._dirmatch('/home/foo/bar/', '/home/foo/bar/etc')
        assert not clonevirtualenv._dirmatch('/home/foo/bar', '/home/foo/bar/etc')