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.
Files changed (20) hide show
  1. {testgres_os_ops-2.0.0/testgres.os_ops.egg-info → testgres_os_ops-2.0.2}/PKG-INFO +4 -4
  2. {testgres_os_ops-2.0.0 → testgres_os_ops-2.0.2}/README.md +1 -1
  3. {testgres_os_ops-2.0.0 → testgres_os_ops-2.0.2}/pyproject.toml +3 -3
  4. {testgres_os_ops-2.0.0 → testgres_os_ops-2.0.2}/src/remote_ops.py +1 -1
  5. {testgres_os_ops-2.0.0 → testgres_os_ops-2.0.2/testgres.os_ops.egg-info}/PKG-INFO +4 -4
  6. testgres_os_ops-2.0.2/testgres.os_ops.egg-info/requires.txt +3 -0
  7. {testgres_os_ops-2.0.0 → testgres_os_ops-2.0.2}/tests/test_os_ops_common.py +48 -2
  8. testgres_os_ops-2.0.0/testgres.os_ops.egg-info/requires.txt +0 -3
  9. {testgres_os_ops-2.0.0 → testgres_os_ops-2.0.2}/LICENSE +0 -0
  10. {testgres_os_ops-2.0.0 → testgres_os_ops-2.0.2}/setup.cfg +0 -0
  11. {testgres_os_ops-2.0.0 → testgres_os_ops-2.0.2}/src/exceptions.py +0 -0
  12. {testgres_os_ops-2.0.0 → testgres_os_ops-2.0.2}/src/helpers.py +0 -0
  13. {testgres_os_ops-2.0.0 → testgres_os_ops-2.0.2}/src/local_ops.py +0 -0
  14. {testgres_os_ops-2.0.0 → testgres_os_ops-2.0.2}/src/os_ops.py +0 -0
  15. {testgres_os_ops-2.0.0 → testgres_os_ops-2.0.2}/src/raise_error.py +0 -0
  16. {testgres_os_ops-2.0.0 → testgres_os_ops-2.0.2}/testgres.os_ops.egg-info/SOURCES.txt +0 -0
  17. {testgres_os_ops-2.0.0 → testgres_os_ops-2.0.2}/testgres.os_ops.egg-info/dependency_links.txt +0 -0
  18. {testgres_os_ops-2.0.0 → testgres_os_ops-2.0.2}/testgres.os_ops.egg-info/top_level.txt +0 -0
  19. {testgres_os_ops-2.0.0 → testgres_os_ops-2.0.2}/tests/test_os_ops_local.py +0 -0
  20. {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.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.17
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.0
27
+ Requires-Dist: testgres.common<2.0.0,>=1.0.1
28
28
  Dynamic: license-file
29
29
 
30
- [![Build Status](https://api.travis-ci.com/postgrespro/testgres.os_ops.svg?token=HgEMhyw9n7RCQkHCis4T&branch=master)](https://travis-ci.com/github/postgrespro/testgres.os_ops)
30
+ [![CI Status](https://img.shields.io/github/actions/workflow/status/postgrespro/testgres.os_ops/.github/workflows/package-verification.yml?label=CI)](https://github.com/postgrespro/testgres.os_ops/actions/workflows/package-verification.yml)
31
31
  [![PyPI package version](https://badge.fury.io/py/testgres_os_ops.svg)](https://badge.fury.io/py/testgres.os_ops)
32
32
  [![PyPI python versions](https://img.shields.io/pypi/pyversions/testgres_os_ops)](https://pypi.org/project/testgres.os-ops)
33
33
  [![PyPI downloads](https://img.shields.io/pypi/dm/testgres_os_ops)](https://pypi.org/project/testgres.os-ops)
@@ -1,4 +1,4 @@
1
- [![Build Status](https://api.travis-ci.com/postgrespro/testgres.os_ops.svg?token=HgEMhyw9n7RCQkHCis4T&branch=master)](https://travis-ci.com/github/postgrespro/testgres.os_ops)
1
+ [![CI Status](https://img.shields.io/github/actions/workflow/status/postgrespro/testgres.os_ops/.github/workflows/package-verification.yml?label=CI)](https://github.com/postgrespro/testgres.os_ops/actions/workflows/package-verification.yml)
2
2
  [![PyPI package version](https://badge.fury.io/py/testgres_os_ops.svg)](https://badge.fury.io/py/testgres.os_ops)
3
3
  [![PyPI python versions](https://img.shields.io/pypi/pyversions/testgres_os_ops)](https://pypi.org/project/testgres.os-ops)
4
4
  [![PyPI downloads](https://img.shields.io/pypi/dm/testgres_os_ops)](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.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.17"
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.0,<2.0.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.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.17
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.0
27
+ Requires-Dist: testgres.common<2.0.0,>=1.0.1
28
28
  Dynamic: license-file
29
29
 
30
- [![Build Status](https://api.travis-ci.com/postgrespro/testgres.os_ops.svg?token=HgEMhyw9n7RCQkHCis4T&branch=master)](https://travis-ci.com/github/postgrespro/testgres.os_ops)
30
+ [![CI Status](https://img.shields.io/github/actions/workflow/status/postgrespro/testgres.os_ops/.github/workflows/package-verification.yml?label=CI)](https://github.com/postgrespro/testgres.os_ops/actions/workflows/package-verification.yml)
31
31
  [![PyPI package version](https://badge.fury.io/py/testgres_os_ops.svg)](https://badge.fury.io/py/testgres.os_ops)
32
32
  [![PyPI python versions](https://img.shields.io/pypi/pyversions/testgres_os_ops)](https://pypi.org/project/testgres.os-ops)
33
33
  [![PyPI downloads](https://img.shields.io/pypi/dm/testgres_os_ops)](https://pypi.org/project/testgres.os-ops)
@@ -0,0 +1,3 @@
1
+ psutil
2
+ six>=1.9.0
3
+ testgres.common<2.0.0,>=1.0.1
@@ -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
- expected_dir = str(tempfile.tempdir)
880
- assert actual_dir == expected_dir
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
@@ -1,3 +0,0 @@
1
- psutil
2
- six>=1.9.0
3
- testgres.common<2.0.0,>=1.0.0
File without changes