File tree Expand file tree Collapse file tree 1 file changed +14
-13
lines changed
tests/functional/view/create Expand file tree Collapse file tree 1 file changed +14
-13
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+ create view v_test as select id, 5 as x from test;
1819
19- test_script = """CREATE VIEW test (id,num) AS SELECT id,5 FROM tb ;
20- SHOW VIEW test ;
20+ insert into test (id) values(1) ;
21+ select * from v_test ;
2122"""
2223
23- act = isql_act ('db' , test_script )
24+ substitutions = [('[ \t ]+' , ' ' )]
25+ act = isql_act ('db' , test_script , substitutions = substitutions )
2426
25- expected_stdout = """ID INTEGER Nullable
26- NUM INTEGER Expression
27- View Source:
28- ==== ======
29- SELECT id,5 FROM tb
27+ expected_stdout = """
28+ ID 1
29+ X 5
3030"""
3131
3232@pytest .mark .version ('>=3.0' )
3333def test_1 (act : Action ):
34+
3435 act .expected_stdout = expected_stdout
35- act .execute ()
36+ act .execute (combine_output = True )
3637 assert act .clean_stdout == act .clean_expected_stdout
You can’t perform that action at this time.
0 commit comments