Mercurial > hgrepos > Python > apps > py-cutils
comparison tests/test_treesum.py @ 380:58552d3d1766
treesum: begin unittests for treesums and .treesum files
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Mon, 12 May 2025 15:33:16 +0200 |
| parents | |
| children | ff4424a7a8cf |
comparison
equal
deleted
inserted
replaced
| 379:6d7659a709f2 | 380:58552d3d1766 |
|---|---|
| 1 # -*- coding: utf-8 -*- | |
| 2 # :- | |
| 3 # SPDX-FileCopyrightText: © 2025 Franz Glasner | |
| 4 # SPDX-License-Identifier: BSD-3-Clause | |
| 5 # :- | |
| 6 r"""Unit tests for treesum | |
| 7 | |
| 8 """ | |
| 9 | |
| 10 from __future__ import absolute_import, print_function | |
| 11 | |
| 12 import os | |
| 13 import shutil | |
| 14 import sys | |
| 15 import unittest | |
| 16 | |
| 17 from _test_setup import (DATADIR, TMPDIR) | |
| 18 | |
| 19 import cutils.treesum | |
| 20 | |
| 21 | |
| 22 class TreesumTests(unittest.TestCase): | |
| 23 | |
| 24 def setUp(self): | |
| 25 if not os.path.isdir(TMPDIR): | |
| 26 os.mkdir(TMPDIR) | |
| 27 | |
| 28 def tearDown(self): | |
| 29 if os.path.isdir(TMPDIR): | |
| 30 shutil.rmtree(TMPDIR) | |
| 31 | |
| 32 def test_xxx(self): | |
| 33 self.assertTrue(True) | |
| 34 | |
| 35 | |
| 36 if __name__ == "__main__": | |
| 37 print(TMPDIR) | |
| 38 sys.exit(unittest.main()) |
