From cc9d5798b3ab551bf2a1b7402574f471f83083e5 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Mon, 10 Nov 2014 18:18:28 -0500 Subject: [PATCH] Add an extra root dir test --- test/test_streamlayerformat.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/test_streamlayerformat.py b/test/test_streamlayerformat.py index 4ec639126..63a525491 100644 --- a/test/test_streamlayerformat.py +++ b/test/test_streamlayerformat.py @@ -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()