Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_non_str_arguments_to_source1_source2():
for x in (
(None, 'str'),
('str', None),
):
a = io.StringIO('a')
b = io.StringIO('b')
with pytest.raises(TypeError):
Difference.from_text_readers(a, b, *x)
def compare(self, other, source=None):
with open(self.path) as my_content, \
open(other.path) as other_content:
return Difference.from_text_readers(my_content, other_content, self.name, other.name, source=source, comment="symlink")
def compare_details(self, other, source=None):
return [Difference.from_text_readers(
list_libarchive(self.path),
list_libarchive(other.path),
self.path,
other.path,
source="file list",
)]
def compare_details(self, other, source=None):
differences = [Difference.from_text_readers(
list_libarchive(self.path),
list_libarchive(other.path),
self.path,
other.path,
source="file list",
)]
differences.extend(_compare_elf_data(self.path, other.path))
return differences
def compare_details(self, other, source=None):
return [Difference.from_text_readers(list_libarchive(self.path),
list_libarchive(other.path),
self.path, other.path, source="file list")]
def compare(self, other, source=None):
with open(self.path) as my_content, \
open(other.path) as other_content:
return Difference.from_text_readers(my_content, other_content, self.name, other.name, source=source, comment="device")