test_stash.py 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. # test_stash.py -- tests for stash
  2. # Copyright (C) 2018 Jelmer Vernooij <jelmer@jelmer.uk>
  3. #
  4. # SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  5. # Dulwich is dual-licensed under the Apache License, Version 2.0 and the GNU
  6. # General Public License as public by the Free Software Foundation; version 2.0
  7. # or (at your option) any later version. You can redistribute it and/or
  8. # modify it under the terms of either of these two licenses.
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. #
  16. # You should have received a copy of the licenses; if not, see
  17. # <http://www.gnu.org/licenses/> for a copy of the GNU General Public License
  18. # and <http://www.apache.org/licenses/LICENSE-2.0> for a copy of the Apache
  19. # License, Version 2.0.
  20. #
  21. """Tests for stashes."""
  22. from dulwich.repo import MemoryRepo
  23. from dulwich.stash import Stash
  24. from . import TestCase
  25. class StashTests(TestCase):
  26. """Tests for stash."""
  27. def test_obtain(self) -> None:
  28. repo = MemoryRepo()
  29. stash = Stash.from_repo(repo)
  30. self.assertIsInstance(stash, Stash)