Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ No changes to highlight.
No changes to highlight.

## Testing and Infrastructure Changes:
No changes to highlight.
* Fixed test for IP address by [@abidlabs](https://github.com/abidlabs) in [PR 2808](https://github.com/gradio-app/gradio/pull/2808)

## Breaking Changes:
No changes to highlight.
Expand Down
5 changes: 1 addition & 4 deletions test/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,7 @@ def test_get_ip(self):
ip = get_local_ip_address()
if ip == "No internet connection":
return
try: # check whether ip is valid
ipaddress.ip_address(ip)
except ValueError:
self.fail("Invalid IP address")
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self.fail() was the old unittest-based way of doing it. It's not necessary so I've removed it

ipaddress.ip_address(ip)

@mock.patch("requests.get")
def test_get_ip_without_internet(self, mock_get):
Expand Down