File tree 4 files changed +32
-9
lines changed
4 files changed +32
-9
lines changed Original file line number Diff line number Diff line change
1
+ dist
2
+ env
3
+ venv
4
+ * .egg-info
Original file line number Diff line number Diff line change @@ -42,15 +42,17 @@ time coverage run -a tests/test_simple.py
42
42
43
43
44
44
# run tests (PG_BIN)
45
- export PG_BIN=$( dirname $( which pg_config) )
46
- time coverage run -a tests/test_simple.py
47
- unset PG_BIN
45
+ time \
46
+ PG_BIN=$( dirname $( which pg_config) ) \
47
+ ALT_CONFIG=1 \
48
+ coverage run -a tests/test_simple.py
48
49
49
50
50
51
# run tests (PG_CONFIG)
51
- export PG_CONFIG=$( which pg_config)
52
- time coverage run -a tests/test_simple.py
53
- unset PG_CONFIG
52
+ time \
53
+ PG_CONFIG=$( which pg_config) \
54
+ ALT_CONFIG=1 \
55
+ coverage run -a tests/test_simple.py
54
56
55
57
56
58
# show coverage
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ export PG_BIN=/path/to/pg/bin
21
21
22
22
``` bash
23
23
# Set path to PostgreSQL and python version
24
- export PATH=$PATH : /path/to/pg/bin
24
+ export PATH=/path/to/pg/bin: $PATH
25
25
export PYTHON_VERSION=3 # or 2
26
26
27
27
# Run tests
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ def removing(f):
69
69
os .remove (f )
70
70
71
71
72
- class SimpleTest (unittest .TestCase ):
72
+ class TestgresTests (unittest .TestCase ):
73
73
def test_custom_init (self ):
74
74
with get_new_node () as node :
75
75
# enable page checksums
@@ -757,4 +757,21 @@ def test_child_pids(self):
757
757
758
758
759
759
if __name__ == '__main__' :
760
- unittest .main ()
760
+ if os .environ .get ('ALT_CONFIG' ):
761
+ suite = unittest .TestSuite ()
762
+
763
+ # Small subset of tests for alternative configs (PG_BIN or PG_CONFIG)
764
+ suite .addTest (TestgresTests ('test_pg_config' ))
765
+ suite .addTest (TestgresTests ('test_pg_ctl' ))
766
+ suite .addTest (TestgresTests ('test_psql' ))
767
+ suite .addTest (TestgresTests ('test_replicate' ))
768
+
769
+ print ('Running tests for alternative config:' )
770
+ for t in suite :
771
+ print (t )
772
+ print ()
773
+
774
+ runner = unittest .TextTestRunner ()
775
+ runner .run (suite )
776
+ else :
777
+ unittest .main ()
You can’t perform that action at this time.
0 commit comments