MCPcopy
hub / github.com/beetbox/beets / _assert_dest

Method _assert_dest

test/test_library.py:606–616  ·  view source on GitHub ↗
(self, dest, item)

Source from the content-addressed store, hash-verified

604 self.lib.path_formats.insert(0, ("default", fmt))
605
606 def _assert_dest(self, dest, item):
607 # Handle paths on Windows.
608 if os.path.sep != "/":
609 dest = dest.replace(b"/", os.path.sep.encode())
610
611 # Paths are normalized based on the CWD.
612 dest = normpath(dest)
613
614 actual = item.destination()
615
616 assert actual == dest
617
618
619class TestDestinationFunction(TestHelper, PathFormattingMixin):

Callers 15

test_asciify_variableMethod · 0.45
test_left_variableMethod · 0.45
test_right_variableMethod · 0.45
test_if_falseMethod · 0.45
test_if_false_valueMethod · 0.45
test_if_trueMethod · 0.45
test_if_else_falseMethod · 0.45

Calls 4

normpathFunction · 0.90
replaceMethod · 0.80
destinationMethod · 0.80
encodeMethod · 0.45

Tested by

no test coverage detected