MCPcopy Create free account
hub / github.com/numpy/numpy / test_1

Method test_1

numpy/distutils/tests/test_misc_util.py:38–48  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

36class TestMinrelpath:
37
38 def test_1(self):
39 n = lambda path: path.replace('/', sep)
40 assert_equal(minrelpath(n('aa/bb')), n('aa/bb'))
41 assert_equal(minrelpath('..'), '..')
42 assert_equal(minrelpath(n('aa/..')), '')
43 assert_equal(minrelpath(n('aa/../bb')), 'bb')
44 assert_equal(minrelpath(n('aa/bb/..')), 'aa')
45 assert_equal(minrelpath(n('aa/bb/../..')), '')
46 assert_equal(minrelpath(n('aa/bb/../cc/../dd')), n('aa/dd'))
47 assert_equal(minrelpath(n('.././..')), n('../..'))
48 assert_equal(minrelpath(n('aa/bb/.././../dd')), n('dd'))
49
50class TestGpaths:
51

Callers

nothing calls this directly

Calls 3

assert_equalFunction · 0.90
minrelpathFunction · 0.90
replaceMethod · 0.80

Tested by

no test coverage detected