8000 Tests are based on pytest by dmitry-lipetsk · Pull Request #192 · postgrespro/testgres · GitHub
[go: up one dir, main page]

Skip to content

Tests are based on pytest #192

8000
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
f37c299
Using pytest [pytest.raises]
dmitry-lipetsk Feb 23, 2025
53e468e
Using pytest [pytest.skip]
dmitry-lipetsk Feb 23, 2025
12d702a
Using pytest [assertIsNotNone]
dmitry-lipetsk Feb 23, 2025
1cb664e
Using pytest [assertFalse]
dmitry-lipetsk Feb 23, 2025
e2e7e8b
Using pytest [assertTrue]
dmitry-lipetsk Feb 23, 2025
89784a8
Using pytest [assertEqual]
dmitry-lipetsk Feb 23, 2025
2252d60
Using pytest [assertNotEqual]
dmitry-lipetsk Feb 23, 2025
e8aad3d
Using pytest [assertGreaterEqual]
dmitry-lipetsk Feb 23, 2025
eaaa276
Using pytest [assertGreater]
dmitry-lipetsk Feb 23, 2025
4afbe00
Using pytest [assertIn]
dmitry-lipetsk Feb 23, 2025
a8e57ae
Using pytest [assertListEqual]
dmitry-lipetsk Feb 23, 2025
df199b9
unittest is not used
dmitry-lipetsk Feb 23, 2025
a82cf3d
Code style (flake8)
dmitry-lipetsk Feb 23, 2025
9745bc4
Merge commit '38b3dc3697d229b6668217f2f57825379c7f2e23' into D2025022…
dmitry-lipetsk Feb 23, 2025
27c4f40
Execution signature is removed
dmitry-lipetsk Feb 24, 2025
ae41d16
run_tests.sh installs pytest
dmitry-lipetsk Feb 24, 2025
a14b3d7
run_tests.sh is updated
dmitry-lipetsk Feb 24, 2025
e6f4448
Total refactoring of tests
dmitr 8000 y-lipetsk Feb 24, 2025
842bc08
Code style (flake8)
dmitry-lipetsk Feb 24, 2025
d9afdcc
Merge commit 'de738f9fd8d52345677903bface575d41cbe539c' into D2025022…
dmitry-lipetsk Feb 24, 2025
027d2ea
Merge branch 'D20250224_002--os_ops-in-free_utilities' into D20250223…
dmitry-lipetsk Feb 24, 2025
969e49d
Root __init__.py is added
dmitry-lipetsk Feb 24, 2025
6e2820d
Code style (flake8)
dmitry-lipetsk Feb 24, 2025
588b28b
Merge remote-tracking branch 'origin/D20250224_002--os_ops-in-free_ut…
dmitry-lipetsk Feb 24, 2025
e4e8909
pytest.ini is added
dmitry-lipetsk Feb 24, 2025
66860d0
TestgresTests::test_ports_management is corrected
dmitry-lipetsk Feb 24, 2025
aaaa677
coding: utf-8
dmitry-lipetsk Feb 24, 2025
60bb4c5
Cleanup
dmitry-lipetsk Feb 24, 2025
2d2532c
CI runs all the tests of testgres.
dmitry-lipetsk Feb 24, 2025
537a9ac
Add install ssh
Feb 24, 2025
1f99813
Revert "Add install ssh"
dmitry-lipetsk Feb 25, 2025
41455d6
Revert "CI runs all the tests of testgres."
dmitry-lipetsk Feb 25, 2025
1c43810
Merge commit '669e134ff65b99cd285500e5f362633fc8d50e4e' into D2025022…
dmitry-lipetsk Feb 25, 2025
47a51a8
Test of probackup plugin is restored
dmitry-lipetsk Feb 25, 2025
f7f163d
The test suite of a probackup plugin is based on pytest
dmitry-lipetsk Feb 25, 2025
ed7b187
Probackup plugin is updated
dmitry-lipetsk Feb 25, 2025
8af4a49
CI test use 4 cores
dmitry-lipetsk Feb 25, 2025
d35ca43
testgres.plugins.probackup2.Init was restored [thanks to Yuri Sokolov]
dmitry-lipetsk Feb 25, 2025
181126b
pytest.ini is updated [testpaths]
dmitry-lipetsk Feb 25, 2025
d08f659
test_child_pids (local, remote) is updated
dmitry-lipetsk Feb 25, 2025
e803146
test_child_process_dies is updated
dmitry-lipetsk Feb 25, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
unittest is not used
  • Loading branch information
dmitry-lipetsk committed Feb 23, 2025
commit df199b92d7d9534dc4ddf9fcdb491d1a559ab44c
23 changes: 1 addition & 22 deletions tests/test_simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import testgres
import time
import six
import unittest
import pytest
import psutil
import platform
Expand Down Expand Up @@ -107,7 +106,7 @@ def removing(f):
rmtree(f, ignore_errors=True)


class TestgresTests(unittest.TestCase):
class TestgresTests:
def test_node_repr(self):
with get_new_node() as node:
pattern = r"PostgresNode\(name='.+', port=.+, base_dir='.+'\)"
Expand Down Expand Up @@ -1342,23 +1341,3 @@ def helper__skip_test_if_pg_version_is_ge(version: str):
if pg_version_ge(version):
pytest.skip('requires <{0}'.format(version))


if __name__ == '__main__':
if os.environ.get('ALT_CONFIG'):
suite = unittest.TestSuite()

# Small subset of tests for alternative configs (PG_BIN or PG_CONFIG)
suite.addTest(TestgresTests('test_pg_config'))
suite.addTest(TestgresTests('test_pg_ctl'))
suite.addTest(TestgresTests('test_psql'))
suite.addTest(TestgresTests('test_replicate'))

print('Running tests for alternative config:')
for t in suite:
print(t)
print()

runner = unittest.TextTestRunner()
runner.run(suite)
else:
unittest.main()
23 changes: 1 addition & 22 deletions tests/test_simple_remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import testgres
import time
import six
import unittest
import pytest
import psutil

Expand Down Expand Up @@ -95,7 +94,7 @@ def removing(f):
os_ops.rmdirs(f, ignore_errors=True)


class TestgresRemoteTests(unittest.TestCase):
class TestgresRemoteTests:
def test_node_repr(self):
with get_remote_node(conn_params=conn_params) as node:
pattern = r"PostgresNode\(name='.+', port=.+, base_dir='.+'\)"
Expand Down Expand Up @@ -1106,23 +1105,3 @@ def helper__skip_test_if_pg_version_is_ge(version: str):
if pg_version_ge(version):
pytest.skip('requires <{0}'.format(version))


if __name__ == '__main__':
if os_ops.environ('ALT_CONFIG'):
suite = unittest.TestSuite()

# Small subset of tests for alternative configs (PG_BIN or PG_CONFIG)
suite.addTest(TestgresRemoteTests('test_pg_config'))
suite.addTest(TestgresRemoteTests('test_pg_ctl'))
suite.addTest(TestgresRemoteTests('test_psql'))
suite.addTest(TestgresRemoteTests('test_replicate'))

print('Running tests for alternative config:')
for t in suite:
print(t)
print()

runner = unittest.TextTestRunner()
runner.run(suite)
else:
unittest.main()
0