Skip to content

Commit

Permalink
Adding a test for connections missing neurotransmitter (#419)
Browse files Browse the repository at this point in the history
  • Loading branch information
mwatts15 committed Jun 9, 2019
1 parent 95c1586 commit 2f4f4b0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
3 changes: 2 additions & 1 deletion PyOpenWorm/import_override.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ def mb(mod):
else:
return mod

return mb(self.mapper.process_module(module_name=module_name, cb=cb, caller=caller))
return mb(self.mapper.process_module(module_name=module_name,
cb=cb, caller=caller))
self.import_wrapper = import_wrapper
self.wrapped = None

Expand Down
14 changes: 14 additions & 0 deletions tests/DataIntegrityTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,20 @@ def test_number_neuron_to_muscle(self):

self.assertEqual(1111, synapse.count())

def test_synapses_have_neurotransmitters(self):
"""
This test checks that synapses have neurotransmitters associated with them
"""
synapse = self.qctx(Connection).query()
synapse.termination('neuron')
self.qctx(Worm)().get_neuron_network().synapse(synapse)
no_nt = []
for m in synapse.load():
if not m.synclass():
no_nt.append(m)

self.assertEqual([], no_nt)

def test_correct_number_unique_neurons(self):
"""
This test verifies that the worm model has exactly 300 unique neurons
Expand Down

0 comments on commit 2f4f4b0

Please sign in to comment.