File tree Expand file tree Collapse file tree 1 file changed +14
-12
lines changed
tests/functional/view/create Expand file tree Collapse file tree 1 file changed +14
-12
lines changed Original file line number Diff line number Diff line change 1010import pytest
1111from firebird .qa import *
1212
13- init_script = """CREATE TABLE tb(id INT);
14- commit;
15- """
13+ db = db_factory ()
1614
17- db = db_factory (init = init_script )
15+ test_script = """
16+ set list on;
17+ create table test(id int);
18+ commit;
19+ create view v_test as select * from test;
1820
19- test_script = """CREATE VIEW test AS SELECT * FROM tb ;
20- SHOW VIEW test ;
21+ insert into test(id) values(1) ;
22+ select id from v_test ;
2123"""
2224
23- act = isql_act ('db' , test_script )
25+ substitutions = [('[ \t ]+' , ' ' )]
26+ act = isql_act ('db' , test_script , substitutions = substitutions )
2427
25- expected_stdout = """ID INTEGER Nullable
26- View Source:
27- ==== ======
28- SELECT * FROM tb
28+ expected_stdout = """
29+ ID 1
2930"""
3031
3132@pytest .mark .version ('>=3.0' )
3233def test_1 (act : Action ):
34+
3335 act .expected_stdout = expected_stdout
34- act .execute ()
36+ act .execute (combine_output = True )
3537 assert act .clean_stdout == act .clean_expected_stdout
You can’t perform that action at this time.
0 commit comments