Skip to content

Commit

Permalink
Merge pull request #1 from josdem/feature/12
Browse files Browse the repository at this point in the history
Feature/12
  • Loading branch information
josdem committed Jun 7, 2024
2 parents cc9f05f + 0fafb0f commit cacc9d5
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: Creating logger
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,10 @@ or

```bash
python3 -m unittest discover -s tests
```

#### To run a single test

```bash
python -m unittest tests/test_name.py
```
12 changes: 12 additions & 0 deletions tests/test_mock_log.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from unittest.mock import MagicMock
from python.create_log import *
import unittest

class FixedTest(unittest.TestCase):
path = "vetlog.log"
def test_create_logger(self):
log = Logger(self.path)
logger = MagicMock()
log.logger = logger
assert log.get_logger() == logger

0 comments on commit cacc9d5

Please sign in to comment.