Ver código fonte

[tests] nettoyage des db de test

Maxime Alves LIRMM@home 3 anos atrás
pai
commit
bd84e9e3c4
1 arquivos alterados com 4 adições e 0 exclusões
  1. 4
    0
      tests/conftest.py

+ 4
- 0
tests/conftest.py Ver arquivo

25
 
25
 
26
     yield
26
     yield
27
 
27
 
28
+    os.unlink(tmpdb)
29
+
28
 
30
 
29
 @pytest.fixture(scope="module")
31
 @pytest.fixture(scope="module")
30
 def set_db_values():
32
 def set_db_values():
32
     db_file = "./db/prod-b827ebbcab83-20201206.db"
34
     db_file = "./db/prod-b827ebbcab83-20201206.db"
33
     shutil.copy(db_file, tmpdb)
35
     shutil.copy(db_file, tmpdb)
34
     config['heatpump']['database'] = tmpdb
36
     config['heatpump']['database'] = tmpdb
37
+
35
     yield
38
     yield
39
+    os.unlink(tmpdb)
36
 
40
 
37
 
41
 
38
 @pytest.fixture
42
 @pytest.fixture

Carregando…
Cancelar
Salvar