Skip to content

Commit

Permalink
readded server test
Browse files Browse the repository at this point in the history
  • Loading branch information
hannorein committed May 6, 2024
1 parent 7d0b714 commit 0c8cd41
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions rebound/tests/test_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ def test_start_without_download(self):
self.assertEqual(sim._server_data.contents.ready,1)
self.assertEqual(sim._server_data.contents.port,1234)

#def test_start_with_download(self):
# if os.path.isfile("rebound.html"):
# os.remove("rebound.html")
# sim = rebound.Simulation()
# with warnings.catch_warnings(record=True) as w:
# warnings.simplefilter("always")
# sim.start_server(port=1234)
# self.assertEqual(len(w),1)
# self.assertNotEqual(sim._server_data,None)
# self.assertEqual(sim._server_data.contents.ready,1)
# self.assertEqual(sim._server_data.contents.port,1234)
def test_start_with_download(self):
if os.path.isfile("rebound.html"):
os.remove("rebound.html")
sim = rebound.Simulation()
with warnings.catch_warnings(record=True) as w:
warnings.simplefilter("always")
sim.start_server(port=1234)
self.assertEqual(len(w),1)
self.assertNotEqual(sim._server_data,None)
self.assertEqual(sim._server_data.contents.ready,1)
self.assertEqual(sim._server_data.contents.port,1234)

def test_connect(self):
teststring = "<h1>Hi</h1>"
Expand Down

0 comments on commit 0c8cd41

Please sign in to comment.