Skip to content

Commit

Permalink
πŸ†™ Bump ruff from 0.4.8 to 0.4.9 (#88)
Browse files Browse the repository at this point in the history
* Bump ruff from 0.4.8 to 0.4.9

Bumps [ruff](https://github.com/astral-sh/ruff) from 0.4.8 to 0.4.9.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](astral-sh/ruff@v0.4.8...v0.4.9)

---
updated-dependencies:
- dependency-name: ruff
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* 🧹 Format

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: awtkns <[email protected]>
  • Loading branch information
dependabot[bot] and awtkns committed Jun 18, 2024
1 parent b2007a0 commit 8733d83
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 38 deletions.
36 changes: 18 additions & 18 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 16 additions & 20 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,40 +4,36 @@


def test_parse_args_default(mocker):
test_args = [
'tarsier',
'path/to/credentials.json',
'http://example.com'
]
mocker.patch('sys.argv', test_args)
test_args = ["tarsier", "path/to/credentials.json", "http://example.com"]
mocker.patch("sys.argv", test_args)

args = parse_args()
assert args.credentials_path == 'path/to/credentials.json'
assert args.url == 'http://example.com'
assert args.credentials_path == "path/to/credentials.json"
assert args.url == "http://example.com"
assert args.verbose is False
assert args.ocr_provider == 'google'
assert args.ocr_provider == "google"


def test_parse_args_non_default(mocker):
test_args = [
'tarsier',
'path/to/credentials.json',
'http://example.com',
'--verbose',
'--ocr_provider', 'microsoft'
"tarsier",
"path/to/credentials.json",
"http://example.com",
"--verbose",
"--ocr_provider",
"microsoft",
]
mocker.patch('sys.argv', test_args)
mocker.patch("sys.argv", test_args)

args = parse_args()
assert args.credentials_path == 'path/to/credentials.json'
assert args.url == 'http://example.com'
assert args.credentials_path == "path/to/credentials.json"
assert args.url == "http://example.com"
assert args.verbose is True
assert args.ocr_provider == 'microsoft'
assert args.ocr_provider == "microsoft"


# noinspection PyTypeChecker
@pytest.mark.asyncio
async def test_main_unknown_provider():
with pytest.raises(ValueError):
await main(__file__, 'http://example.com', True, 'unknown')

await main(__file__, "http://example.com", True, "unknown")

0 comments on commit 8733d83

Please sign in to comment.