Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] authored and why-not-try-calmer committed Feb 21, 2023
1 parent c9589eb commit 856a49d
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
4 changes: 3 additions & 1 deletion qgispluginci/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
import sys
import logging
logging.basicConfig(level=logging.DEBUG)

logging.basicConfig(stream=sys.stdout, level=logging.DEBUG)
1 change: 1 addition & 0 deletions qgispluginci/translation.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
# GLOBALS
logger = logging.getLogger(__name__)


class Translation:
def __init__(
self, parameters: Parameters, transifex_token: str, create_project: bool = True
Expand Down
4 changes: 4 additions & 0 deletions test/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import logging
import sys

logging.basicConfig(stream=sys.stdout, level=logging.INFO)
8 changes: 5 additions & 3 deletions test/test_translation.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
# Tests
from .utils import can_skip_test

# Logging
logger = logging.getLogger(__name__)

class TestTranslation(unittest.TestCase):
@classmethod
Expand All @@ -28,19 +30,19 @@ def setUpClass(cls):
assert cls.transifex_token

def setUp(self):
"""Initialize the next test method (run between every test method)"""
"""Initialize the next test method (run before every test method)"""
self.t = Translation(self.parameters, transifex_token=self.transifex_token)

def tearDown(self):
try:
self.t._t.delete_project(self.parameters.project_slug)
except PyTransifexException as error:
logging.debug(error)
logger.debug(error)
"""
try:
self.t._t.delete_team(f"{self.parameters.project_slug}-team")
except PyTransifexException as error:
logging.debug(error)
logger.debug(error)
"""

@unittest.skipIf(can_skip_test(), "Missing transifex_token")
Expand Down

0 comments on commit 856a49d

Please sign in to comment.