File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 1515# You should have received a copy of the GNU General Public License
1616# along with this program. If not, see <http://www.gnu.org/licenses/>.
1717
18- from typing import Tuple , Type
18+ from typing import Iterable , Tuple , Type
1919
2020from pontos .version .errors import ProjectError
2121
@@ -47,3 +47,7 @@ def gather_project() -> VersionCommand:
4747 return command
4848
4949 raise ProjectError ("No project settings file found" )
50+
51+
52+ def get_commands () -> Iterable [Type [VersionCommand ]]:
53+ return _COMMANDS
Original file line number Diff line number Diff line change 1919
2020from pontos .testing import temp_directory , temp_python_module
2121from pontos .version .cmake import CMakeVersionCommand
22- from pontos .version .commands import gather_project
22+ from pontos .version .commands import gather_project , get_commands
2323from pontos .version .errors import ProjectError
2424from pontos .version .go import GoVersionCommand
2525from pontos .version .javascript import JavaScriptVersionCommand
@@ -71,3 +71,8 @@ def test_cmake_project_version(self):
7171 version_file .write_text ("project(VERSION 1.2.3)" , encoding = "utf8" )
7272
7373 self .assertIsInstance (gather_project (), CMakeVersionCommand )
74+
75+
76+ class GetCommandsTestCase (unittest .TestCase ):
77+ def test_available_commands (self ):
78+ self .assertEqual (len (get_commands ()), 4 )
You can’t perform that action at this time.
0 commit comments