|
| 1 | + |
| 2 | +import glob |
| 3 | +import os |
| 4 | + |
1 | 5 | import pytest
|
2 | 6 |
|
3 | 7 | from dbt.tests.adapter.basic.test_base import BaseSimpleMaterializations
|
|
11 | 15 | from dbt.tests.adapter.basic.test_snapshot_timestamp import BaseSnapshotTimestamp
|
12 | 16 | from dbt.tests.adapter.basic.test_adapter_methods import BaseAdapterMethod
|
13 | 17 |
|
14 |
| -class TestSimpleMaterializationsSqlite(BaseSimpleMaterializations): |
| 18 | + |
| 19 | +class TearDownMixin(): |
| 20 | + @classmethod |
| 21 | + def teardown_class(module): |
| 22 | + for path in glob.glob('/tmp/dbt-sqlite-tests/*.db'): |
| 23 | + print("DELETING") |
| 24 | + os.remove(path) |
| 25 | + |
| 26 | + |
| 27 | +class TestSimpleMaterializationsSqlite(BaseSimpleMaterializations, TearDownMixin): |
15 | 28 | pass
|
16 | 29 |
|
17 | 30 |
|
18 |
| -class TestSingularTestsSqlite(BaseSingularTests): |
| 31 | +class TestSingularTestsSqlite(BaseSingularTests, TearDownMixin): |
19 | 32 | pass
|
20 | 33 |
|
21 | 34 |
|
22 |
| -class TestSingularTestsEphemeralSqlite(BaseSingularTestsEphemeral): |
| 35 | +class TestSingularTestsEphemeralSqlite(BaseSingularTestsEphemeral, TearDownMixin): |
23 | 36 | pass
|
24 | 37 |
|
25 | 38 |
|
26 |
| -class TestEmptySqlite(BaseEmpty): |
| 39 | +class TestEmptySqlite(BaseEmpty, TearDownMixin): |
27 | 40 | pass
|
28 | 41 |
|
29 | 42 |
|
30 |
| -class TestEphemeralSqlite(BaseEphemeral): |
| 43 | +class TestEphemeralSqlite(BaseEphemeral, TearDownMixin): |
31 | 44 | pass
|
32 | 45 |
|
33 | 46 |
|
34 |
| -class TestIncrementalSqlite(BaseIncremental): |
| 47 | +class TestIncrementalSqlite(BaseIncremental, TearDownMixin): |
35 | 48 | pass
|
36 | 49 |
|
37 | 50 |
|
38 |
| -class TestGenericTestsSqlite(BaseGenericTests): |
| 51 | +class TestGenericTestsSqlite(BaseGenericTests, TearDownMixin): |
39 | 52 | pass
|
40 | 53 |
|
41 | 54 |
|
42 |
| -class TestSnapshotCheckColsSqlite(BaseSnapshotCheckCols): |
| 55 | +class TestSnapshotCheckColsSqlite(BaseSnapshotCheckCols, TearDownMixin): |
43 | 56 | pass
|
44 | 57 |
|
45 | 58 |
|
46 |
| -class TestSnapshotTimestampSqlite(BaseSnapshotTimestamp): |
| 59 | +class TestSnapshotTimestampSqlite(BaseSnapshotTimestamp, TearDownMixin): |
47 | 60 | pass
|
48 | 61 |
|
49 | 62 |
|
50 |
| -class TestBaseAdapterMethod(BaseAdapterMethod): |
| 63 | +class TestBaseAdapterMethod(BaseAdapterMethod, TearDownMixin): |
51 | 64 | pass
|
0 commit comments