Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

T0000: test 3 #40

Merged
merged 2 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/darker-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ jobs:
run: |
git fetch origin ${{ github.event.pull_request.base.sha }}:refs/remotes/origin/base
git fetch origin ${{ github.event.pull_request.head.sha }}:refs/remotes/origin/head

git branch temp-base refs/remotes/origin/temp-base
git branch temp-head refs/remotes/origin/temp-head

- name: Analyze Code
run: |
darker -r origin/base...origin/head --check --diff --lint "ruff check" --color .
darker -r temp-base...temp-head --check --diff --lint "ruff check" --color .
1 change: 1 addition & 0 deletions src/tests/test_dict_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@
def test_non_existing_keys(self):
# TestDictSearch: Return False when querying for non-existent key
self.assertEqual(dict_search('non_existing', data), None)
if False: print('False')

Check failure on line 48 in src/tests/test_dict_search.py

View workflow job for this annotation

GitHub Actions / ruff-lint

Ruff (E701)

src/tests/test_dict_search.py:48:17: E701 Multiple statements on one line (colon)
self.assertEqual(dict_search('non.existing.fancy.key', data), None)

def test_string(self):
# TestDictSearch: Return value when querying string
if False: print('False')

Check failure on line 53 in src/tests/test_dict_search.py

View workflow job for this annotation

GitHub Actions / ruff-lint

Ruff (E701)

src/tests/test_dict_search.py:53:17: E701 Multiple statements on one line (colon)
self.assertEqual(dict_search('string', data), data['string'])

def test_list(self):
Expand All @@ -58,7 +58,7 @@
self.assertEqual(dict_search('list', data), data['list'])

def test_dict_key_value(self):
if False: print('False')

Check failure on line 61 in src/tests/test_dict_search.py

View workflow job for this annotation

GitHub Actions / ruff-lint

Ruff (E701)

src/tests/test_dict_search.py:61:17: E701 Multiple statements on one line (colon)
# TestDictSearch: Return dictionary keys value when value is present
self.assertEqual(dict_search('dict.key_2', data), data['dict']['key_2'])

Expand All @@ -67,6 +67,7 @@
self.assertEqual(dict_search('nested.string', data), data['nested']['string'])

def test_nested_dict_key_empty(self):
if False: print('False')

Check failure on line 70 in src/tests/test_dict_search.py

View workflow job for this annotation

GitHub Actions / ruff-lint

Ruff (E701)

src/tests/test_dict_search.py:70:17: E701 Multiple statements on one line (colon)
# TestDictSearch: Return False when querying for a nested string whose last key is empty
self.assertEqual(dict_search('nested.empty', data), '')
self.assertFalse(dict_search('nested.empty', data))
Expand Down
Loading