|
3 | 3 | [](https://pypi.python.org/pypi/winregistry) |
4 | 4 | [](https://pypi.python.org/pypi/winregistry) |
5 | 5 |
|
6 | | -A Python library for interacting with the Windows registry |
7 | | - |
8 | | -## Features |
9 | | - |
10 | | -- Easy to use API for Windows registry operations |
11 | | -- Supports creating, reading, updating, and deleting registry keys and values |
12 | | -- Compatible with Robot Framework for automated testing |
| 6 | +A Python library for interacting with the Windows registry. This library provides a simple and intuitive API for performing common registry operations, making it easier to work with the Windows registry in Python applications and automated tests. |
13 | 7 |
|
14 | 8 | ## Installation |
15 | 9 |
|
@@ -92,75 +86,41 @@ with open_key( |
92 | 86 |
|
93 | 87 | ## Usage with [Robot Testing Framework](https://robotframework.org/) |
94 | 88 |
|
| 89 | +The library provides a Robot Framework library that makes it easy to work with the Windows registry in automated tests. The library is available as `winregistry.robot`. |
| 90 | + |
95 | 91 | ### Documentation |
96 | 92 |
|
| 93 | +For detailed documentation of the Robot Framework library, visit: |
97 | 94 | https://shpaker.github.io/winregistry/winregistry.robot |
98 | 95 |
|
99 | | -### Example |
100 | | - |
101 | | -```robotframework |
102 | | -*** Variables *** |
103 | | -${ SUITE_KEY_NAME } HKLM\\SOFTWARE\\_ROBOT_TESTS_ |
104 | | -${ SHORT_CASE_KEY_NAME } _CASE_KEY_ |
105 | | -${ CASE_KEY_NAME } ${ SUITE_KEY_NAME }\\${ SHORT_CASE_KEY_NAME } |
106 | | -${ VALUE_NAME } some_testing_value |
107 | | -
|
108 | | -*** Settings *** |
109 | | -Library Collections |
110 | | -Library winregistry.robot |
111 | | -Suite Setup Create Registry Key ${ SUITE_KEY_NAME } |
112 | | -Suite Teardown Delete Registry Key ${ SUITE_KEY_NAME } |
113 | | -
|
114 | | -*** Test Cases *** |
115 | | -TEST REGISTRY KEYS |
116 | | - [Teardown] Delete Registry Key ${ CASE_KEY_NAME } |
117 | | -
|
118 | | - ${ items } = Get Registry Key Sub Keys ${ SUITE_KEY_NAME } |
119 | | - List Should Not Contain Value ${ items } ${ SHORT_CASE_KEY_NAME } |
120 | | - Registry Key Should Not Exist ${ CASE_KEY_NAME } |
121 | | - Create Registry Key ${ CASE_KEY_NAME } |
122 | | - Registry Key Should Exist ${ CASE_KEY_NAME } |
123 | | - ${ items } = Get Registry Key Sub Keys ${ SUITE_KEY_NAME } |
124 | | - List Should Contain Value ${ items } ${ SHORT_CASE_KEY_NAME } |
125 | | -
|
126 | | -
|
127 | | -TEST REGISTRY VALUES |
128 | | - [Setup] Create Registry Key ${ CASE_KEY_NAME } |
129 | | - [Teardown] Delete Registry Key ${ CASE_KEY_NAME } |
130 | | -
|
131 | | - ${ items } = Get Registry Key Values Names ${ CASE_KEY_NAME } |
132 | | - List Should Not Contain Value ${ items } ${ VALUE_NAME } |
133 | | - Registry Value Should Not Exist ${ CASE_KEY_NAME } ${ VALUE_NAME } |
134 | | - Create Registry Value ${ CASE_KEY_NAME } ${ VALUE_NAME } SZ |
135 | | - Registry Value Should Exist ${ CASE_KEY_NAME } ${ VALUE_NAME } |
136 | | - ${ items } = Get Registry Key Values Names ${ CASE_KEY_NAME } |
137 | | - List Should Contain Value ${ items } ${ VALUE_NAME } |
138 | | - ${ value } = Read Registry Value ${ CASE_KEY_NAME } ${ VALUE_NAME } |
139 | | - Should Be Equal ${ value.data } ${ EMPTY } |
140 | | - Set Registry Value ${ CASE_KEY_NAME } ${ VALUE_NAME } Remove me! |
141 | | - ${ value } = Read Registry Value ${ CASE_KEY_NAME } ${ VALUE_NAME } |
142 | | - Should Be Equal ${ value.data } Remove me! |
143 | | - Delete Registry Value ${ CASE_KEY_NAME } ${ VALUE_NAME } |
144 | | -``` |
| 96 | +### Example Tests |
| 97 | + |
| 98 | +A complete set of example tests demonstrating various registry operations can be found in the [winregistry_tests.robot](winregistry_tests.robot) file. These tests cover: |
| 99 | + |
| 100 | +- Creating and deleting registry keys |
| 101 | +- Working with nested registry keys |
| 102 | +- Setting and reading registry values |
| 103 | +- Verifying registry key and value existence |
| 104 | +- Enumerating subkeys and values |
145 | 105 |
|
146 | 106 | ## Contributing |
147 | 107 |
|
148 | 108 | Contributions are welcome! Please read our contributing guidelines for more details. |
149 | 109 |
|
150 | 110 | ### Setting Up the Development Environment |
151 | 111 |
|
152 | | -We use `poetry` for dependency management and packaging. To set up your development environment, follow these steps: |
| 112 | +We use `uv` for dependency management and packaging. To set up your development environment, follow these steps: |
153 | 113 |
|
154 | | -1. Install `poetry` if you haven't already: |
| 114 | +1. Install `uv` if you haven't already: |
155 | 115 |
|
156 | 116 | ```bash |
157 | | - pip install poetry |
| 117 | + pip install uv |
158 | 118 | ``` |
159 | 119 |
|
160 | 120 | 2. Install the project dependencies: |
161 | 121 |
|
162 | 122 | ```bash |
163 | | - poetry install --sync |
| 123 | + uv sync --verbose --no-progress --locked --all-extras |
164 | 124 | ``` |
165 | 125 |
|
166 | 126 | ### Code Formatting and Linting |
|
0 commit comments