• Home
  • Raw
  • Download

Lines Matching refs:assertEqual

50         self.assertEqual(posixpath.join("/foo", "bar", "/bar", "baz"),
52 self.assertEqual(posixpath.join("/foo", "bar", "baz"), "/foo/bar/baz")
53 self.assertEqual(posixpath.join("/foo/", "bar/", "baz/"),
56 self.assertEqual(posixpath.join(b"/foo", b"bar", b"/bar", b"baz"),
58 self.assertEqual(posixpath.join(b"/foo", b"bar", b"baz"),
60 self.assertEqual(posixpath.join(b"/foo/", b"bar/", b"baz/"),
64 self.assertEqual(posixpath.split("/foo/bar"), ("/foo", "bar"))
65 self.assertEqual(posixpath.split("/"), ("/", ""))
66 self.assertEqual(posixpath.split("foo"), ("", "foo"))
67 self.assertEqual(posixpath.split("////foo"), ("////", "foo"))
68 self.assertEqual(posixpath.split("//foo//bar"), ("//foo", "bar"))
70 self.assertEqual(posixpath.split(b"/foo/bar"), (b"/foo", b"bar"))
71 self.assertEqual(posixpath.split(b"/"), (b"/", b""))
72 self.assertEqual(posixpath.split(b"foo"), (b"", b"foo"))
73 self.assertEqual(posixpath.split(b"////foo"), (b"////", b"foo"))
74 self.assertEqual(posixpath.split(b"//foo//bar"), (b"//foo", b"bar"))
77 self.assertEqual(posixpath.splitext(path), (filename, ext))
78 self.assertEqual(posixpath.splitext("/" + path), ("/" + filename, ext))
79 self.assertEqual(posixpath.splitext("abc/" + path),
81 self.assertEqual(posixpath.splitext("abc.def/" + path),
83 self.assertEqual(posixpath.splitext("/abc.def/" + path),
85 self.assertEqual(posixpath.splitext(path + "/"),
92 self.assertEqual(posixpath.splitext(path), (filename, ext))
93 self.assertEqual(posixpath.splitext(b"/" + path),
95 self.assertEqual(posixpath.splitext(b"abc/" + path),
97 self.assertEqual(posixpath.splitext(b"abc.def/" + path),
99 self.assertEqual(posixpath.splitext(b"/abc.def/" + path),
101 self.assertEqual(posixpath.splitext(path + b"/"),
132 self.assertEqual(posixpath.basename("/foo/bar"), "bar")
133 self.assertEqual(posixpath.basename("/"), "")
134 self.assertEqual(posixpath.basename("foo"), "foo")
135 self.assertEqual(posixpath.basename("////foo"), "foo")
136 self.assertEqual(posixpath.basename("//foo//bar"), "bar")
138 self.assertEqual(posixpath.basename(b"/foo/bar"), b"bar")
139 self.assertEqual(posixpath.basename(b"/"), b"")
140 self.assertEqual(posixpath.basename(b"foo"), b"foo")
141 self.assertEqual(posixpath.basename(b"////foo"), b"foo")
142 self.assertEqual(posixpath.basename(b"//foo//bar"), b"bar")
145 self.assertEqual(posixpath.dirname("/foo/bar"), "/foo")
146 self.assertEqual(posixpath.dirname("/"), "/")
147 self.assertEqual(posixpath.dirname("foo"), "")
148 self.assertEqual(posixpath.dirname("////foo"), "////")
149 self.assertEqual(posixpath.dirname("//foo//bar"), "//foo")
151 self.assertEqual(posixpath.dirname(b"/foo/bar"), b"/foo")
152 self.assertEqual(posixpath.dirname(b"/"), b"/")
153 self.assertEqual(posixpath.dirname(b"foo"), b"")
154 self.assertEqual(posixpath.dirname(b"////foo"), b"////")
155 self.assertEqual(posixpath.dirname(b"//foo//bar"), b"//foo")
247 self.assertEqual(posixpath.expanduser("foo"), "foo")
248 self.assertEqual(posixpath.expanduser(b"foo"), b"foo")
253 self.assertEqual(posixpath.expanduser("~"), "/home/victor")
257 self.assertEqual(posixpath.expanduser("~"), "/home/victor")
262 self.assertEqual(posixpath.expanduser("~"), "/")
263 self.assertEqual(posixpath.expanduser("~/"), "/")
264 self.assertEqual(posixpath.expanduser("~/foo"), "/foo")
276 self.assertEqual(
280 self.assertEqual(
296 self.assertEqual(posixpath.expanduser("~"), home)
305 self.assertEqual(posixpath.expanduser(path), path)
308 self.assertEqual(posixpath.normpath(""), ".")
309 self.assertEqual(posixpath.normpath("/"), "/")
310 self.assertEqual(posixpath.normpath("//"), "//")
311 self.assertEqual(posixpath.normpath("///"), "/")
312 self.assertEqual(posixpath.normpath("///foo/.//bar//"), "/foo/bar")
313 self.assertEqual(posixpath.normpath("///foo/.//bar//.//..//.//baz"),
315 self.assertEqual(posixpath.normpath("///..//./foo/.//bar"), "/foo/bar")
317 self.assertEqual(posixpath.normpath(b""), b".")
318 self.assertEqual(posixpath.normpath(b"/"), b"/")
319 self.assertEqual(posixpath.normpath(b"//"), b"//")
320 self.assertEqual(posixpath.normpath(b"///"), b"/")
321 self.assertEqual(posixpath.normpath(b"///foo/.//bar//"), b"/foo/bar")
322 self.assertEqual(posixpath.normpath(b"///foo/.//bar//.//..//.//baz"),
324 self.assertEqual(posixpath.normpath(b"///..//./foo/.//bar"),
329 self.assertEqual(realpath('.'), os.getcwd())
330 self.assertEqual(realpath('./.'), os.getcwd())
331 self.assertEqual(realpath('/'.join(['.'] * 100)), os.getcwd())
333 self.assertEqual(realpath(b'.'), os.getcwdb())
334 self.assertEqual(realpath(b'./.'), os.getcwdb())
335 self.assertEqual(realpath(b'/'.join([b'.'] * 100)), os.getcwdb())
339 self.assertEqual(realpath('..'), dirname(os.getcwd()))
340 self.assertEqual(realpath('../..'), dirname(dirname(os.getcwd())))
341 self.assertEqual(realpath('/'.join(['..'] * 100)), '/')
343 self.assertEqual(realpath(b'..'), dirname(os.getcwdb()))
344 self.assertEqual(realpath(b'../..'), dirname(dirname(os.getcwdb())))
345 self.assertEqual(realpath(b'/'.join([b'..'] * 100)), b'/')
354 self.assertEqual(realpath(ABSTFN), ABSTFN+"1")
377 self.assertEqual(realpath(ABSTFN), ABSTFN+"1")
389 self.assertEqual(realpath(ABSTFN), ABSTFN)
393 self.assertEqual(realpath(ABSTFN+"1"), ABSTFN+"1")
394 self.assertEqual(realpath(ABSTFN+"2"), ABSTFN+"2")
396 self.assertEqual(realpath(ABSTFN+"1/x"), ABSTFN+"1/x")
397 self.assertEqual(realpath(ABSTFN+"1/.."), dirname(ABSTFN))
398 self.assertEqual(realpath(ABSTFN+"1/../x"), dirname(ABSTFN) + "/x")
400 self.assertEqual(realpath(ABSTFN+"1/../" + basename(ABSTFN) + "y"),
402 self.assertEqual(realpath(ABSTFN+"1/../" + basename(ABSTFN) + "1"),
406 self.assertEqual(realpath(ABSTFN+"a"), ABSTFN+"a/b")
410 self.assertEqual(realpath(ABSTFN+"c"), ABSTFN+"c")
414 self.assertEqual(realpath(basename(ABSTFN)), ABSTFN)
474 self.assertEqual(realpath(ABSTFN + '/link'), ABSTFN)
490 self.assertEqual(realpath(ABSTFN + '/%d' % depth), ABSTFN)
494 self.assertEqual(realpath('%d' % depth), ABSTFN)
514 self.assertEqual(realpath("a"), ABSTFN + "/y/a")
538 self.assertEqual(realpath(ABSTFN + "/link-y/.."), ABSTFN + "/k")
541 self.assertEqual(realpath(basename(ABSTFN) + "/link-y/.."),
562 self.assertEqual(realpath(base + "link"), ABSTFN)
563 self.assertEqual(realpath(base + "link/k"), ABSTFN + "/k")
574 self.assertEqual(posixpath.relpath("a"), "a")
575 self.assertEqual(posixpath.relpath(posixpath.abspath("a")), "a")
576 self.assertEqual(posixpath.relpath("a/b"), "a/b")
577 self.assertEqual(posixpath.relpath("../a/b"), "../a/b")
578 self.assertEqual(posixpath.relpath("a", "../b"), "../"+curdir+"/a")
579 self.assertEqual(posixpath.relpath("a/b", "../c"),
581 self.assertEqual(posixpath.relpath("a", "b/c"), "../../a")
582 self.assertEqual(posixpath.relpath("a", "a"), ".")
583 self.assertEqual(posixpath.relpath("/foo/bar/bat", "/x/y/z"), '../../../foo/bar/bat')
584 self.assertEqual(posixpath.relpath("/foo/bar/bat", "/foo/bar"), 'bat')
585 self.assertEqual(posixpath.relpath("/foo/bar/bat", "/"), 'foo/bar/bat')
586 self.assertEqual(posixpath.relpath("/", "/foo/bar/bat"), '../../..')
587 self.assertEqual(posixpath.relpath("/foo/bar/bat", "/x"), '../foo/bar/bat')
588 self.assertEqual(posixpath.relpath("/x", "/foo/bar/bat"), '../../../x')
589 self.assertEqual(posixpath.relpath("/", "/"), '.')
590 self.assertEqual(posixpath.relpath("/a", "/a"), '.')
591 self.assertEqual(posixpath.relpath("/a/b", "/a/b"), '.')
600 self.assertEqual(posixpath.relpath(b"a"), b"a")
601 self.assertEqual(posixpath.relpath(posixpath.abspath(b"a")), b"a")
602 self.assertEqual(posixpath.relpath(b"a/b"), b"a/b")
603 self.assertEqual(posixpath.relpath(b"../a/b"), b"../a/b")
604 self.assertEqual(posixpath.relpath(b"a", b"../b"),
606 self.assertEqual(posixpath.relpath(b"a/b", b"../c"),
608 self.assertEqual(posixpath.relpath(b"a", b"b/c"), b"../../a")
609 self.assertEqual(posixpath.relpath(b"a", b"a"), b".")
610 self.assertEqual(posixpath.relpath(b"/foo/bar/bat", b"/x/y/z"), b'../../../foo/bar/bat')
611 self.assertEqual(posixpath.relpath(b"/foo/bar/bat", b"/foo/bar"), b'bat')
612 self.assertEqual(posixpath.relpath(b"/foo/bar/bat", b"/"), b'foo/bar/bat')
613 self.assertEqual(posixpath.relpath(b"/", b"/foo/bar/bat"), b'../../..')
614 self.assertEqual(posixpath.relpath(b"/foo/bar/bat", b"/x"), b'../foo/bar/bat')
615 self.assertEqual(posixpath.relpath(b"/x", b"/foo/bar/bat"), b'../../../x')
616 self.assertEqual(posixpath.relpath(b"/", b"/"), b'.')
617 self.assertEqual(posixpath.relpath(b"/a", b"/a"), b'.')
618 self.assertEqual(posixpath.relpath(b"/a/b", b"/a/b"), b'.')
627 self.assertEqual(posixpath.commonpath(paths), expected)
628 self.assertEqual(posixpath.commonpath([os.fsencode(p) for p in paths]),
697 self.assertEqual(func(self.file_path), func(self.file_name))
706 self.assertEqual(self.path.join('a', FakePath('b'), 'c'),
753 self.assertEqual(common_path, self.file_name)