Skip to content

Commit

Permalink
fix: set max split to 1 in fastapi because the path had many dots
Browse files Browse the repository at this point in the history
  • Loading branch information
LeOndaz committed Oct 11, 2021
1 parent 068ecad commit 86e174e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion liveandletdie/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)

def create_command(self):
path_without_extension = self.path.rsplit('.')[0]
path_without_extension = self.path.rsplit('.', 1)[0]

return [
self.executable,
Expand Down
5 changes: 4 additions & 1 deletion test_examples/unittest_example/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,10 @@ class TestGAE(unittest.TestCase):
@test_decorator
class TestFastAPI(unittest.TestCase):
EXPECTED_TEXT = 'Home FastAPI'
app = liveandletdie.FastAPIServer(abspath('sample_apps/fastapi/main.py'), port=PORT)
app = liveandletdie.FastAPIServer(
abspath('sample_apps/fastapi/main.py'),
port=PORT
)


if __name__ == '__main__':
Expand Down

0 comments on commit 86e174e

Please sign in to comment.