Skip to content

Commit b00b618

Browse files
authored
Delete commented code
1 parent f5e8e1a commit b00b618

File tree

1 file changed

+2
-91
lines changed

1 file changed

+2
-91
lines changed
Lines changed: 2 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import { VirtualDocument } from '../../virtual/document';
22
import { expect } from 'chai';
3-
import { foreign_code_extractors, SQL_URL_PATTERN } from './extractors';
3+
import { foreign_code_extractors } from './extractors';
44
import {
55
extract_code,
6-
get_the_only_virtual,
7-
wrap_in_python_lines
6+
get_the_only_virtual
87
} from '../../extractors/testutils';
98

109
describe('Bigquery SQL extractors', () => {
@@ -30,55 +29,6 @@ describe('Bigquery SQL extractors', () => {
3029
document.clear();
3130
});
3231

33-
/*
34-
describe('SQL url pattern', () => {
35-
it('matches connection strings', () => {
36-
const correct_urls = [
37-
'mysql+pymysql://scott:tiger@localhost/foo',
38-
'oracle://scott:[email protected]:1521/sidname',
39-
'sqlite://',
40-
'sqlite:///foo.db',
41-
'mssql+pyodbc://username:password@host/database?driver=SQL+Server+Native+Client+11.0',
42-
'impala://hserverhost:port/default?kerberos_service_name=hive&auth_mechanism=GSSAPI'
43-
];
44-
const pattern = new RegExp(SQL_URL_PATTERN);
45-
for (let url of correct_urls) {
46-
expect(pattern.test(url)).to.equal(true);
47-
}
48-
});
49-
});
50-
*/
51-
/* describe('%bigquery line magic', () => {
52-
it('extracts simple commands', () => {
53-
let code = wrap_in_python_lines('%bigquery select * from work');
54-
let { cell_code_kept, foreign_document_map } = extract(code);
55-
56-
// should not be removed, but left for the static analysis (using magic overrides)
57-
expect(cell_code_kept).to.equal(code);
58-
let document = get_the_only_virtual(foreign_document_map);
59-
expect(document.language).to.equal('sql');
60-
expect(document.value).to.equal('select * from work\n');
61-
});*/
62-
/*
63-
it('leaves out the connection specification', () => {
64-
let code = wrap_in_python_lines(
65-
'%sql postgresql://will:longliveliz@localhost/shakes'
66-
);
67-
let foreign_document_map = extract(code).foreign_document_map;
68-
let document = get_the_only_virtual(foreign_document_map);
69-
expect(document.language).to.equal('sql');
70-
expect(document.value).to.equal('\n');
71-
});
72-
73-
it('leaves out options', () => {
74-
let code = wrap_in_python_lines('%bigquery -l');
75-
let foreign_document_map = extract(code).foreign_document_map;
76-
let document = get_the_only_virtual(foreign_document_map);
77-
expect(document.language).to.equal('sql');
78-
expect(document.value).to.equal('\n');
79-
});
80-
});
81-
*/
8232
describe('%%bigquery cell magic', () => {
8333
it('extracts simple commands', () => {
8434
let code = "%%bigquery\nselect * from character\nwhere abbrev = 'ALICE'";
@@ -91,46 +41,7 @@ describe('Bigquery SQL extractors', () => {
9141
"select * from character\nwhere abbrev = 'ALICE'\n"
9242
);
9343
});
94-
/*
95-
it('leaves out the connection specification', () => {
96-
let code =
97-
"%%sql postgresql://will:longliveliz@localhost/shakes\nselect * from character\nwhere abbrev = 'ALICE'";
98-
let { foreign_document_map } = extract(code);
9944

100-
let document = get_the_only_virtual(foreign_document_map);
101-
expect(document.language).to.equal('sql');
102-
expect(document.value).to.equal(
103-
"select * from character\nwhere abbrev = 'ALICE'\n"
104-
);
105-
});
106-
107-
108-
it('leaves out the variable assignment', () => {
109-
let code = '%%sql works << SELECT title, year\nFROM work';
110-
let { foreign_document_map } = extract(code);
111-
112-
let document = get_the_only_virtual(foreign_document_map);
113-
expect(document.language).to.equal('sql');
114-
expect(document.value).to.equal('SELECT title, year\nFROM work\n');
115-
});
116-
117-
it('leaves out existing connection references', () => {
118-
let code = '%%sql will@shakes\nSELECT title, year\nFROM work';
119-
let { foreign_document_map } = extract(code);
120-
121-
let document = get_the_only_virtual(foreign_document_map);
122-
expect(document.language).to.equal('sql');
123-
expect(document.value).to.equal('SELECT title, year\nFROM work\n');
124-
});
125-
*/
126-
/* it('leaves out persist option', () => {
127-
let code = '%%bigquery --persist dataframe\nSELECT * FROM dataframe;';
128-
let { foreign_document_map } = extract(code);
129-
let document = get_the_only_virtual(foreign_document_map);
130-
expect(document.language).to.equal('sql');
131-
expect(document.value).to.equal('SELECT * FROM dataframe;\n');
132-
});
133-
*/
13445

13546
});
13647
});

0 commit comments

Comments
 (0)