Merge branch 'develop' into 'main'
develop See merge request DasMoorhuhn/autopicture-v3!6
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
pytest:
|
||||
image: python:3.12-alpine
|
||||
only:
|
||||
- main
|
||||
script:
|
||||
- sh tests/start_tests_gitlab.sh
|
||||
- sed -i "s#<source>/builds/DasMoorhuhn/autopicture-v3/src</source>#<source>${CI_PROJECT_DIR}</source>#g" coverage.xml
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import yaml
|
||||
import os
|
||||
|
||||
config_file = "config.yml"
|
||||
|
||||
|
||||
@@ -1,6 +1,21 @@
|
||||
import unittest
|
||||
|
||||
from src import config as config_module
|
||||
|
||||
|
||||
class TestConfig(unittest.TestCase):
|
||||
def test_config(self):
|
||||
pass
|
||||
def test_config_class(self):
|
||||
test_config = {
|
||||
"src": "/src/src",
|
||||
"dst": "/src/dst"
|
||||
}
|
||||
|
||||
config = config_module.Config(test_config)
|
||||
assert config.src == "/src/src"
|
||||
assert config.dst == "/src/dst"
|
||||
|
||||
def test_get_config(self):
|
||||
config_module.config_file = "src/config.yml"
|
||||
config = config_module.get_config()
|
||||
assert config.src == "../app/Temp"
|
||||
assert config.dst == "../app/Bilder"
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
import unittest
|
||||
from unittest.mock import Mock
|
||||
|
||||
from src import config
|
||||
from src.process import start_process
|
||||
|
||||
config.config_file = "src/config.yml"
|
||||
|
||||
|
||||
@unittest.skip("")
|
||||
class TestProcess(unittest.TestCase):
|
||||
def test_process(self):
|
||||
start_process(logger=Mock())
|
||||
|
||||
@@ -42,8 +42,11 @@ class TestSamsung(unittest.TestCase):
|
||||
assert image.make == "samsung"
|
||||
|
||||
|
||||
@unittest.skip("")
|
||||
class TestApple(unittest.TestCase):
|
||||
def test_iphone(self):
|
||||
pass
|
||||
def test_iphone_x(self):
|
||||
copy_images(brand="iphone", model="x")
|
||||
files = recursive_scan_folder(path=TEST_FOLDER)
|
||||
meta_data = get_meta_data(images=files)
|
||||
for image in meta_data:
|
||||
assert image.make == "Apple"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user