Add an extra root dir test

This commit is contained in:
Joseph Schorr 2014-11-10 18:18:28 -05:00
parent 2ccbea95a5
commit cc9d5798b3

View file

@ -337,5 +337,18 @@ class TestStreamLayerMerger(unittest.TestCase):
self.assertHasFile(squashed, 'foobar/baz/some_file', 'foo')
self.assertDoesNotHaveFile(squashed, 'foo/another_file')
def test_delete_root_directory(self):
third_layer = self.create_layer(
foo = 'build/first_file',
bar = 'build/second_file')
second_layer = self.create_layer(
_ = 'build')
squashed = self.squash_layers([second_layer, third_layer])
self.assertDoesNotHaveFile(squashed, 'build/first_file')
self.assertDoesNotHaveFile(squashed, 'build/second_file')
if __name__ == '__main__':
unittest.main()