Add to_model() method to from_disk.{Content,Directory}, to convert to canonical model objects.
Closed
requested to merge generated-differential-D2703-source into generated-differential-D2703-target
1 unresolved thread
Compare changes
Files
4+ 146
− 36
@@ -12,8 +12,11 @@ import unittest
@@ -48,6 +51,57 @@ class ModeToPerms(unittest.TestCase):
@@ -401,19 +455,19 @@ class DataMixin:
@@ -449,6 +503,9 @@ class DataMixin:
@@ -498,6 +555,19 @@ class SymlinkToContent(DataMixin, unittest.TestCase):
@@ -507,45 +577,86 @@ class FileToContent(DataMixin, unittest.TestCase):
@@ -553,9 +664,9 @@ class FileToContent(DataMixin, unittest.TestCase):
@@ -565,15 +676,14 @@ class FileToContent(DataMixin, unittest.TestCase):
@@ -582,7 +692,7 @@ class FileToContent(DataMixin, unittest.TestCase):
@@ -762,12 +872,12 @@ class TarballTest(DataMixin, unittest.TestCase):
I don't think the expected content is that useful. The test would be easier to follow with just
assert content_with_data.data == b'bar'
.Using explicit contents such as
b'written before instantiation'
,b'written before with_data()'
,b'written after with_data()'
instead of metasyntactic stuff would make the test even clearer.