Skip to content

Commit

Permalink
Fix tests on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
space-nuko committed Mar 23, 2023
1 parent 1c1e67a commit 8ee0af6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions gradio/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -1790,6 +1790,7 @@ def _segment_by_slic(self, x):
compactness=10,
sigma=1,
start_label=1,
channel_axis=None
)
except TypeError: # For skimage 0.16 and older
segments_slic = slic(
Expand Down
3 changes: 3 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[pytest]
minversion = 3.7
testpaths = test
2 changes: 1 addition & 1 deletion test/test_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def test_get_config_route(self, test_client):

def test_upload_route(self, test_client):
response = test_client.post(
"/upload", files={"files": open("test/test_files/alphabet.txt", "r")}
"/upload", files={"files": open("test/test_files/alphabet.txt", "rb")}
)
assert response.status_code == 200
file = response.json()[0]
Expand Down

0 comments on commit 8ee0af6

Please sign in to comment.