MCPcopy Index your code
hub / github.com/webpy/webpy / test_reloader

Method test_reloader

tests/test_application.py:42–58  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

40
41class ApplicationTest(unittest.TestCase):
42 def test_reloader(self):
43 write("foo.py", data % dict(classname="a", output="a"))
44 import foo
45
46 app = foo.app
47
48 self.assertEqual(app.request("/").data, b"a")
49
50 # test class change
51 time.sleep(1)
52 write("foo.py", data % dict(classname="a", output="b"))
53 self.assertEqual(app.request("/").data, b"b")
54
55 # test urls change
56 time.sleep(1)
57 write("foo.py", data % dict(classname="c", output="c"))
58 self.assertEqual(app.request("/").data, b"c")
59
60 def test_reloader_nested(self):
61 try:

Callers

nothing calls this directly

Calls 2

writeFunction · 0.85
requestMethod · 0.80

Tested by

no test coverage detected