From 176a3d758f05229eda69d409209acbc95b6ae301 Mon Sep 17 00:00:00 2001 From: Eric Torres Date: Thu, 17 Mar 2022 21:15:33 -0700 Subject: [PATCH] Rename pacmanconf module to pacman --- CHANGELOG.rst | 6 +++++ bin/addpkg | 4 +-- bin/delpkg | 4 +-- .../{pacmanconf.py => pacman.py} | 0 tests/test_pacman.py | 27 +++++++++++++++++++ 5 files changed, 37 insertions(+), 4 deletions(-) rename packaging_scripts/{pacmanconf.py => pacman.py} (100%) create mode 100755 tests/test_pacman.py diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 78aa2b2..d6a365a 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,12 @@ Changelog for packaging-scripts =============================== +Version 1.6 +----------- + +* Project + * Rename pacmanconf module to pacman + Version 1.4 ----------- diff --git a/bin/addpkg b/bin/addpkg index 6de973a..2f07fcf 100644 --- a/bin/addpkg +++ b/bin/addpkg @@ -11,7 +11,7 @@ import argparse import logging import sys -import packaging_scripts.pacmanconf as pacmanconf +import packaging_scripts.pacman as pacman import packaging_scripts.pkgfiles as pkgfiles import packaging_scripts.repos as repos @@ -72,7 +72,7 @@ if __name__ == "__main__": ) parser.add_argument( "repository", - choices=pacmanconf.list_configured_repos(), + choices=pacman.list_configured_repos(), help="the repository to operate on", metavar="repo", ) diff --git a/bin/delpkg b/bin/delpkg index 1069e57..a88fece 100644 --- a/bin/delpkg +++ b/bin/delpkg @@ -11,7 +11,7 @@ import argparse import logging import sys -import packaging_scripts.pacmanconf as pacmanconf +import packaging_scripts.pacman as pacman import packaging_scripts.pkgfiles as pkgfiles import packaging_scripts.repos as repos @@ -70,7 +70,7 @@ if __name__ == "__main__": ) parser.add_argument( "repository", - choices=pacmanconf.list_configured_repos(), + choices=pacman.list_configured_repos(), help="the repository to operate on", metavar="repo", ) diff --git a/packaging_scripts/pacmanconf.py b/packaging_scripts/pacman.py similarity index 100% rename from packaging_scripts/pacmanconf.py rename to packaging_scripts/pacman.py diff --git a/tests/test_pacman.py b/tests/test_pacman.py new file mode 100755 index 0000000..52c6baa --- /dev/null +++ b/tests/test_pacman.py @@ -0,0 +1,27 @@ +import packaging_scripts.pacmanconf as pacmanconf +import re +import unittest + +from hypothesis import given +from hypothesis.strategies import iterables, text +from pathlib import Path +from types import GeneratorType +from unittest.mock import MagicMock, patch + + +# ========== Constants ========== +TESTING_MODULE = f"packaging_scripts.pacmanconf" + + +# ========== Unit Tests ========== +# class TestParseConfigFile(unittest.TestCase): +# def setUp(self): +# self.pat +# +# def tearDown(self): +# +# +# class TestListConfiguredRepos(unittest.TestCase): +# def setUp(self): +# +# def test_removes_one_element(self):