testgres.os-ops 2.0.0__tar.gz → 2.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {testgres_os_ops-2.0.0/testgres.os_ops.egg-info → testgres_os_ops-2.0.2}/PKG-INFO +4 -4
- {testgres_os_ops-2.0.0 → testgres_os_ops-2.0.2}/README.md +1 -1
- {testgres_os_ops-2.0.0 → testgres_os_ops-2.0.2}/pyproject.toml +3 -3
- {testgres_os_ops-2.0.0 → testgres_os_ops-2.0.2}/src/remote_ops.py +1 -1
- {testgres_os_ops-2.0.0 → testgres_os_ops-2.0.2/testgres.os_ops.egg-info}/PKG-INFO +4 -4
- testgres_os_ops-2.0.2/testgres.os_ops.egg-info/requires.txt +3 -0
- {testgres_os_ops-2.0.0 → testgres_os_ops-2.0.2}/tests/test_os_ops_common.py +48 -2
- testgres_os_ops-2.0.0/testgres.os_ops.egg-info/requires.txt +0 -3
- {testgres_os_ops-2.0.0 → testgres_os_ops-2.0.2}/LICENSE +0 -0
- {testgres_os_ops-2.0.0 → testgres_os_ops-2.0.2}/setup.cfg +0 -0
- {testgres_os_ops-2.0.0 → testgres_os_ops-2.0.2}/src/exceptions.py +0 -0
- {testgres_os_ops-2.0.0 → testgres_os_ops-2.0.2}/src/helpers.py +0 -0
- {testgres_os_ops-2.0.0 → testgres_os_ops-2.0.2}/src/local_ops.py +0 -0
- {testgres_os_ops-2.0.0 → testgres_os_ops-2.0.2}/src/os_ops.py +0 -0
- {testgres_os_ops-2.0.0 → testgres_os_ops-2.0.2}/src/raise_error.py +0 -0
- {testgres_os_ops-2.0.0 → testgres_os_ops-2.0.2}/testgres.os_ops.egg-info/SOURCES.txt +0 -0
- {testgres_os_ops-2.0.0 → testgres_os_ops-2.0.2}/testgres.os_ops.egg-info/dependency_links.txt +0 -0
- {testgres_os_ops-2.0.0 → testgres_os_ops-2.0.2}/testgres.os_ops.egg-info/top_level.txt +0 -0
- {testgres_os_ops-2.0.0 → testgres_os_ops-2.0.2}/tests/test_os_ops_local.py +0 -0
- {testgres_os_ops-2.0.0 → testgres_os_ops-2.0.2}/tests/test_os_ops_remote.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: testgres.os_ops
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.2
|
|
4
4
|
Summary: Testgres subsystem to work with OS
|
|
5
5
|
Author-email: Postgres Professional <testgres@postgrespro.ru>
|
|
6
6
|
License: PostgreSQL
|
|
@@ -19,15 +19,15 @@ Classifier: Programming Language :: Python :: 3.13
|
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.14
|
|
20
20
|
Classifier: Topic :: Software Development :: Libraries
|
|
21
21
|
Classifier: Topic :: Software Development :: Testing
|
|
22
|
-
Requires-Python: >=3.7.
|
|
22
|
+
Requires-Python: >=3.7.3
|
|
23
23
|
Description-Content-Type: text/markdown
|
|
24
24
|
License-File: LICENSE
|
|
25
25
|
Requires-Dist: psutil
|
|
26
26
|
Requires-Dist: six>=1.9.0
|
|
27
|
-
Requires-Dist: testgres.common<2.0.0,>=1.0.
|
|
27
|
+
Requires-Dist: testgres.common<2.0.0,>=1.0.1
|
|
28
28
|
Dynamic: license-file
|
|
29
29
|
|
|
30
|
-
[](https://github.com/postgrespro/testgres.os_ops/actions/workflows/package-verification.yml)
|
|
31
31
|
[](https://badge.fury.io/py/testgres.os_ops)
|
|
32
32
|
[](https://pypi.org/project/testgres.os-ops)
|
|
33
33
|
[](https://pypi.org/project/testgres.os-ops)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[](https://github.com/postgrespro/testgres.os_ops/actions/workflows/package-verification.yml)
|
|
2
2
|
[](https://badge.fury.io/py/testgres.os_ops)
|
|
3
3
|
[](https://pypi.org/project/testgres.os-ops)
|
|
4
4
|
[](https://pypi.org/project/testgres.os-ops)
|
|
@@ -11,7 +11,7 @@ exclude = [".git", "__pycache__", "env", "venv"]
|
|
|
11
11
|
|
|
12
12
|
[project]
|
|
13
13
|
name = "testgres.os_ops"
|
|
14
|
-
version = "2.0.
|
|
14
|
+
version = "2.0.2"
|
|
15
15
|
|
|
16
16
|
description = "Testgres subsystem to work with OS"
|
|
17
17
|
readme = "README.md"
|
|
@@ -28,7 +28,7 @@ keywords = [
|
|
|
28
28
|
'testgres',
|
|
29
29
|
]
|
|
30
30
|
|
|
31
|
-
requires-python = ">=3.7.
|
|
31
|
+
requires-python = ">=3.7.3"
|
|
32
32
|
|
|
33
33
|
classifiers = [
|
|
34
34
|
"Intended Audience :: Developers",
|
|
@@ -49,7 +49,7 @@ classifiers = [
|
|
|
49
49
|
dependencies = [
|
|
50
50
|
"psutil",
|
|
51
51
|
"six>=1.9.0",
|
|
52
|
-
"testgres.common>=1.0.
|
|
52
|
+
"testgres.common>=1.0.1,<2.0.0",
|
|
53
53
|
]
|
|
54
54
|
|
|
55
55
|
[project.urls]
|
|
@@ -832,7 +832,7 @@ class RemoteOperations(OsOperations):
|
|
|
832
832
|
assert type(envvar[1]) == str # noqa: E721
|
|
833
833
|
qvalue = __class__._quote_envvar(envvar[1])
|
|
834
834
|
assert type(qvalue) == str # noqa: E721
|
|
835
|
-
result.append(envvar[0] + "=" + qvalue)
|
|
835
|
+
result.append("export " + envvar[0] + "=" + qvalue)
|
|
836
836
|
continue
|
|
837
837
|
|
|
838
838
|
return result
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: testgres.os_ops
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.2
|
|
4
4
|
Summary: Testgres subsystem to work with OS
|
|
5
5
|
Author-email: Postgres Professional <testgres@postgrespro.ru>
|
|
6
6
|
License: PostgreSQL
|
|
@@ -19,15 +19,15 @@ Classifier: Programming Language :: Python :: 3.13
|
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.14
|
|
20
20
|
Classifier: Topic :: Software Development :: Libraries
|
|
21
21
|
Classifier: Topic :: Software Development :: Testing
|
|
22
|
-
Requires-Python: >=3.7.
|
|
22
|
+
Requires-Python: >=3.7.3
|
|
23
23
|
Description-Content-Type: text/markdown
|
|
24
24
|
License-File: LICENSE
|
|
25
25
|
Requires-Dist: psutil
|
|
26
26
|
Requires-Dist: six>=1.9.0
|
|
27
|
-
Requires-Dist: testgres.common<2.0.0,>=1.0.
|
|
27
|
+
Requires-Dist: testgres.common<2.0.0,>=1.0.1
|
|
28
28
|
Dynamic: license-file
|
|
29
29
|
|
|
30
|
-
[](https://github.com/postgrespro/testgres.os_ops/actions/workflows/package-verification.yml)
|
|
31
31
|
[](https://badge.fury.io/py/testgres.os_ops)
|
|
32
32
|
[](https://pypi.org/project/testgres.os-ops)
|
|
33
33
|
[](https://pypi.org/project/testgres.os-ops)
|
|
@@ -130,6 +130,44 @@ class TestOsOpsCommon:
|
|
|
130
130
|
assert type(response) == bytes # noqa: E721
|
|
131
131
|
assert response == b'\n'
|
|
132
132
|
|
|
133
|
+
def test_exec_command_with_exec_env__2(self, os_ops: OsOperations):
|
|
134
|
+
assert isinstance(os_ops, OsOperations)
|
|
135
|
+
|
|
136
|
+
RunConditions.skip_if_windows()
|
|
137
|
+
|
|
138
|
+
C_ENV_NAME = "TESTGRES_TEST__EXEC_ENV_20250414"
|
|
139
|
+
|
|
140
|
+
tmp_file_content = "echo ${{{}}}".format(C_ENV_NAME)
|
|
141
|
+
|
|
142
|
+
logging.info("content is [{}]".format(tmp_file_content))
|
|
143
|
+
|
|
144
|
+
tmp_file = os_ops.mkstemp()
|
|
145
|
+
assert type(tmp_file) == str # noqa: E721
|
|
146
|
+
assert tmp_file != ""
|
|
147
|
+
|
|
148
|
+
logging.info("file is [{}]".format(tmp_file))
|
|
149
|
+
assert os_ops.path_exists(tmp_file)
|
|
150
|
+
|
|
151
|
+
os_ops.write(tmp_file, tmp_file_content)
|
|
152
|
+
|
|
153
|
+
cmd = ["sh", tmp_file]
|
|
154
|
+
|
|
155
|
+
exec_env = {C_ENV_NAME: "Hello!"}
|
|
156
|
+
|
|
157
|
+
response = os_ops.exec_command(cmd, exec_env=exec_env)
|
|
158
|
+
assert response is not None
|
|
159
|
+
assert type(response) == bytes # noqa: E721
|
|
160
|
+
assert response == b'Hello!\n'
|
|
161
|
+
|
|
162
|
+
response = os_ops.exec_command(cmd)
|
|
163
|
+
assert response is not None
|
|
164
|
+
assert type(response) == bytes # noqa: E721
|
|
165
|
+
assert response == b'\n'
|
|
166
|
+
|
|
167
|
+
os_ops.remove_file(tmp_file)
|
|
168
|
+
assert not os_ops.path_exists(tmp_file)
|
|
169
|
+
return
|
|
170
|
+
|
|
133
171
|
def test_exec_command_with_cwd(self, os_ops: OsOperations):
|
|
134
172
|
assert isinstance(os_ops, OsOperations)
|
|
135
173
|
|
|
@@ -876,8 +914,16 @@ class TestOsOpsCommon:
|
|
|
876
914
|
actual_dir = os_ops.get_tempdir()
|
|
877
915
|
assert actual_dir is not None
|
|
878
916
|
assert type(actual_dir) == str # noqa: E721
|
|
879
|
-
|
|
880
|
-
|
|
917
|
+
|
|
918
|
+
# --------
|
|
919
|
+
cmd = [sys.executable, "-c", "import tempfile;print(tempfile.gettempdir());"]
|
|
920
|
+
|
|
921
|
+
expected_dir_b = os_ops.exec_command(cmd)
|
|
922
|
+
assert type(expected_dir_b) == bytes # noqa: E721
|
|
923
|
+
expected_dir = expected_dir_b.decode()
|
|
924
|
+
assert type(expected_dir) == str # noqa: E721
|
|
925
|
+
assert actual_dir + "\n" == expected_dir
|
|
926
|
+
return
|
|
881
927
|
|
|
882
928
|
class tagData_OS_OPS__NUMS:
|
|
883
929
|
os_ops_descr: OsOpsDescr
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{testgres_os_ops-2.0.0 → testgres_os_ops-2.0.2}/testgres.os_ops.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|