Exemplo n.º 1
0
    def setUp(self):
        super(TestNestedBase, self).setUp()
        self.foo_bucket = FooBucket('test_foo_bucket', [
                            Foo('my_foo1', list(range(10)), 'value1', 10),
                            Foo('my_foo2', list(range(10, 20)), 'value2', 20)])
        self.foo_builders = {
            'my_foo1': GroupBuilder('my_foo1',
                                    datasets={'my_data': DatasetBuilder(
                                        'my_data',
                                        list(range(10)),
                                        attributes={'attr2': 10})},
                                    attributes={'attr1': 'value1', 'namespace': CORE_NAMESPACE, 'data_type': 'Foo'}),
            'my_foo2': GroupBuilder('my_foo2', datasets={'my_data':
                                                         DatasetBuilder(
                                                             'my_data',
                                                             list(range(10, 20)),
                                                             attributes={'attr2': 20})},
                                    attributes={'attr1': 'value2', 'namespace': CORE_NAMESPACE, 'data_type': 'Foo'})
        }
        self.setUpBucketBuilder()
        self.setUpBucketSpec()

        self.spec_catalog.register_spec(self.bucket_spec, 'test.yaml')
        self.type_map.register_container_type(CORE_NAMESPACE, 'FooBucket', FooBucket)
        self.type_map.register_map(FooBucket, ObjectMapper)
        self.manager = BuildManager(self.type_map)
Exemplo n.º 2
0
 def setUpBuilder(self):
     optchan_builder = GroupBuilder(
         'optchan1',
         attributes={
             'neurodata_type': 'OpticalChannel',
             'namespace': 'core',
             'help': 'Metadata about an optical channel used to record from an imaging plane'},
         datasets={
             'description': DatasetBuilder('description', 'a fake OpticalChannel'),
             'emission_lambda': DatasetBuilder('emission_lambda', 500.)},
     )
     device_builder = GroupBuilder('dev1',
                                   attributes={'neurodata_type': 'Device',
                                               'namespace': 'core',
                                               'help': 'A recording device e.g. amplifier'})
     return GroupBuilder(
         'imgpln1',
         attributes={
             'neurodata_type': 'ImagingPlane',
             'namespace': 'core',
             'help': 'Metadata about an imaging plane'},
         datasets={
             'description': DatasetBuilder('description', 'a fake ImagingPlane'),
             'excitation_lambda': DatasetBuilder('excitation_lambda', 600.),
             'imaging_rate': DatasetBuilder('imaging_rate', 300.),
             'indicator': DatasetBuilder('indicator', 'GFP'),
             'location': DatasetBuilder('location', 'somewhere in the brain')},
         groups={
             'optchan1': optchan_builder
         },
         links={
             'device': LinkBuilder(device_builder, 'device')
         }
     )
Exemplo n.º 3
0
 def setUpBucketBuilder(self):
     tmp_builder = GroupBuilder('foo_holder', groups=self.foo_builders)
     self.bucket_builder = GroupBuilder(
         'test_foo_bucket',
         groups={'foos': tmp_builder},
         attributes={'namespace':
                     CORE_NAMESPACE, 'data_type': 'FooBucket'})
Exemplo n.º 4
0
 def setUpBuilder(self):
     optchan_builder = GroupBuilder(
         'optchan1',
         attributes={
             'neurodata_type': 'OpticalChannel',
             'namespace': 'core',
             'help': 'Metadata about an optical channel used to record from an imaging plane',
             'source': 'unit test TestImagingPlaneIO'},
         datasets={
             'description': DatasetBuilder('description', 'a fake OpticalChannel'),
             'emission_lambda': DatasetBuilder('emission_lambda', '3.14')},
     )
     return GroupBuilder(
         'imgpln1',
         attributes={
             'neurodata_type': 'ImagingPlane',
             'namespace': 'core',
             'source': 'unit test TestImagingPlaneIO',
             'help': 'Metadata about an imaging plane'},
         datasets={
             'description': DatasetBuilder('description', 'a fake ImagingPlane'),
             'device': DatasetBuilder('device', 'imaging_device_1'),
             'excitation_lambda': DatasetBuilder('excitation_lambda', '6.28'),
             'imaging_rate': DatasetBuilder('imaging_rate', '2.718'),
             'indicator': DatasetBuilder('indicator', 'GFP'),
             'location': DatasetBuilder('location', 'somewhere in the brain')},
         groups={
             'optchan1': optchan_builder
         }
     )
Exemplo n.º 5
0
 def setUpBuilder(self):
     device = GroupBuilder('device_name',
                           attributes={
                               'help': 'A recording device e.g. amplifier',
                               'namespace': 'core',
                               'neurodata_type': 'Device'
                           })
     datasets = [
         DatasetBuilder('slice', data=u'tissue slice'),
         DatasetBuilder('resistance', data=u'something measured in ohms'),
         DatasetBuilder('seal', data=u'sealing method'),
         DatasetBuilder('description', data=u'a fake electrode object'),
         DatasetBuilder('location', data=u'Springfield Elementary School'),
         DatasetBuilder('filtering',
                        data=u'a meaningless free-form text field'),
         DatasetBuilder('initial_access_resistance',
                        data=u'I guess this changes'),
     ]
     elec = GroupBuilder('elec0',
                         attributes={
                             'help':
                             'Metadata about an intracellular electrode',
                             'namespace': 'core',
                             'neurodata_type': 'IntracellularElectrode',
                         },
                         datasets={d.name: d
                                   for d in datasets},
                         links={'device': LinkBuilder(device, 'device')})
     return elec
Exemplo n.º 6
0
 def test_is_empty_false_group_attribute(self):
     """Test is_empty() when group has subgroup with an attribute"""
     gb = GroupBuilder(
         'gb', {
             'my_subgroup':
             GroupBuilder('my_subgroup',
                          attributes={'my_attr': 'attr_value'})
         })
     self.assertEqual(gb.is_empty(), False)
Exemplo n.º 7
0
 def test_is_empty_false_group_dataset(self):
     """Test is_empty() when group has a subgroup with a dataset"""
     gb = GroupBuilder(
         'gb', {
             'my_subgroup':
             GroupBuilder(
                 'my_subgroup',
                 datasets={'my_dataset': DatasetBuilder('my_dataset')})
         })
     self.assertEqual(gb.is_empty(), False)
Exemplo n.º 8
0
 def test_intersecting_datasets(self):
     gb1 = GroupBuilder(
         'gb1',
         datasets={'dataset2': DatasetBuilder('dataset2', [1, 2, 3])})
     gb2 = GroupBuilder(
         'gb2',
         datasets={'dataset2': DatasetBuilder('dataset2', [4, 5, 6])})
     gb1.deep_update(gb2)
     self.assertIn('dataset2', gb1)
     self.assertListEqual(gb1['dataset2'].data, gb2['dataset2'].data)
Exemplo n.º 9
0
    def test_valid_wo_opt_attr(self):
        bar_builder = GroupBuilder('my_bar',
                                   attributes={'data_type': 'Bar', 'attr1': text('a string attribute')},
                                   datasets=[DatasetBuilder('data', 100, attributes={'attr2': 10})])
        foo_builder = GroupBuilder('my_foo',
                                   attributes={'data_type': 'Foo'},
                                   groups=[bar_builder])

        results = self.vmap.validate(foo_builder)
        self.assertEqual(len(results), 0)
Exemplo n.º 10
0
class GroupBuilderSetterTests(unittest.TestCase):
    """Tests for setter functions in GroupBuilder class"""
    def setUp(self):
        self.gb = GroupBuilder('gb')
        self.gb2 = GroupBuilder('gb2', source='file1')

    def tearDown(self):
        pass

    def test_setitem_disabled(self):
        """Test __set_item__ is disabled"""
        with self.assertRaises(NotImplementedError):
            self.gb['key'] = 'value'

    def test_add_dataset(self):
        ds = self.gb.add_dataset('my_dataset', list(range(10)))
        self.assertIsInstance(ds, DatasetBuilder)
        self.assertIs(self.gb, ds.parent)

    def test_add_group(self):
        gp = self.gb.add_group('my_subgroup')
        self.assertIsInstance(gp, GroupBuilder)
        self.assertIs(self.gb['my_subgroup'], gp)
        self.assertIs(self.gb, gp.parent)

    def test_add_link(self):
        gp = self.gb.add_group('my_subgroup')
        sl = self.gb.add_link(gp, 'my_link')
        self.assertIsInstance(sl, LinkBuilder)
        self.assertIs(self.gb['my_link'], sl)
        self.assertIs(self.gb, sl.parent)

    def test_add_external_link(self):
        gp = self.gb2.add_group('my_subgroup')
        el = self.gb.add_link(gp, 'my_externallink')
        self.assertIsInstance(el, LinkBuilder)
        self.assertIs(self.gb['my_externallink'], el)
        self.assertIs(self.gb, el.parent)
        self.assertIs(self.gb2, gp.parent)

    # @unittest.expectedFailure
    def test_set_attribute(self):
        self.gb.set_attribute('key', 'value')
        self.assertIn('key', self.gb.obj_type)
        # self.assertEqual(dict.__getitem__(self.gb, 'attributes')['key'], 'value')
        self.assertEqual(self.gb['key'], 'value')

    def test_parent_constructor(self):
        gb2 = GroupBuilder('gb2', parent=self.gb)
        self.assertIs(gb2.parent, self.gb)

    def test_set_group(self):
        self.gb.set_group(self.gb2)
        self.assertIs(self.gb2.parent, self.gb)
Exemplo n.º 11
0
    def test_valid(self):
        bar_builder = GroupBuilder('my_bar',
                                   attributes={'data_type': 'Bar', 'attr1': 'a string attribute'},
                                   datasets=[DatasetBuilder('data', 100, attributes={'attr2': 10})])

        foo_builder = GroupBuilder('my_foo',
                                   attributes={'data_type': 'Foo', 'foo_attr': 'example Foo object'},
                                   groups=[bar_builder])

        results = self.vmap.validate(foo_builder)
        self.assertEqual(len(results), 0)
Exemplo n.º 12
0
 def test_mutually_exclusive_datasets(self):
     gb1 = GroupBuilder(
         'gb1',
         datasets={'dataset1': DatasetBuilder('dataset1', [1, 2, 3])})
     gb2 = GroupBuilder(
         'gb2',
         datasets={'dataset2': DatasetBuilder('dataset2', [4, 5, 6])})
     gb1.deep_update(gb2)
     self.assertIn('dataset2', gb1)
     # self.assertIs(gb1['dataset2'], gb2['dataset2'])
     self.assertListEqual(gb1['dataset2'].data, gb2['dataset2'].data)
Exemplo n.º 13
0
    def test_invalid_wrong_name_req_type(self):
        bar_builder = GroupBuilder('bad_bar_name',
                                   attributes={'data_type': 'Bar', 'attr1': 'a string attribute'},
                                   datasets=[DatasetBuilder('data', 100, attributes={'attr2': 10})])

        foo_builder = GroupBuilder('my_foo',
                                   attributes={'data_type': 'Foo', 'foo_attr': text('example Foo object')},
                                   groups=[bar_builder])

        results = self.vmap.validate(foo_builder)
        self.assertEqual(len(results), 1)
        self.assertIsInstance(results[0], MissingDataType)  # noqa: F405
        self.assertEqual(results[0].data_type, 'Bar')
Exemplo n.º 14
0
    def setUp(self):
        self.subgroup1 = GroupBuilder('subgroup1')
        self.dataset1 = DatasetBuilder('dataset1', list(range(10)))
        self.soft_link1 = LinkBuilder(self.subgroup1, 'soft_link1')
        self.int_attr = 1
        self.str_attr = "my_str"

        self.group1 = GroupBuilder('group1', {'subgroup1': self.subgroup1})
        self.gb = GroupBuilder('gb', {'group1': self.group1},
                               {'dataset1': self.dataset1}, {
                                   'int_attr': self.int_attr,
                                   'str_attr': self.str_attr
                               }, {'soft_link1': self.soft_link1})
Exemplo n.º 15
0
 def test_get_subspec_data_type_noname(self):
     parent_spec = GroupSpec('Something to hold a Bar',
                             'bar_bucket',
                             groups=[self.bar_spec])
     sub_builder = GroupBuilder('my_bar',
                                attributes={
                                    'data_type': 'Bar',
                                    'namespace': CORE_NAMESPACE
                                })
     builder = GroupBuilder('bar_bucket',
                            groups={'my_bar': sub_builder})  # noqa: F841
     result = self.type_map.get_subspec(parent_spec, sub_builder)
     self.assertIs(result, self.bar_spec)
Exemplo n.º 16
0
 def setUpElectricalSeriesBuilders(self):
     table_builder = TestElectricalSeriesIO.get_table_builder(self)
     data = list(zip(range(10), range(10, 20)))
     timestamps = list(map(lambda x: x/10, range(10)))
     es1 = GroupBuilder('test_eS1',
                         attributes={'source': 'a hypothetical source',
                                     'namespace': base.CORE_NAMESPACE,
                                     'comments': 'no comments',
                                     'description': 'no description',
                                     'neurodata_type': 'ElectricalSeries',
                                     'help': 'Stores acquired voltage data from extracellular recordings'},
                         datasets={'data': DatasetBuilder('data',
                                                          data,
                                                          attributes={'unit': 'volt',
                                                                      'conversion': 1.0,
                                                                      'resolution': 0.0}),
                                   'timestamps': DatasetBuilder('timestamps',
                                                                timestamps,
                                                                attributes={'unit': 'Seconds', 'interval': 1}),
                                   'electrodes': DatasetBuilder('electrodes', data=[0, 2],
                                                                attributes={
                                                                   'neurodata_type': 'DynamicTableRegion',
                                                                   'table': ReferenceBuilder(table_builder),
                                                                   'namespace': 'core',
                                                                   'description': 'the first and third electrodes',
                                                                   'help': 'a subset (i.e. slice or region) of a DynamicTable'})})  # noqa: E501
     data = list(zip(reversed(range(10)), reversed(range(10, 20))))
     es2 = GroupBuilder('test_eS2',
                         attributes={'source': 'a hypothetical source',
                                     'namespace': base.CORE_NAMESPACE,
                                     'comments': 'no comments',
                                     'description': 'no description',
                                     'neurodata_type': 'ElectricalSeries',
                                     'help': 'Stores acquired voltage data from extracellular recordings'},
                         datasets={'data': DatasetBuilder('data',
                                                          data,
                                                          attributes={'unit': 'volt',
                                                                      'conversion': 1.0,
                                                                      'resolution': 0.0}),
                                   'timestamps': DatasetBuilder('timestamps',
                                                                timestamps,
                                                                attributes={'unit': 'Seconds', 'interval': 1}),
                                   'electrodes': DatasetBuilder('electrodes', data=[1, 3],
                                                                attributes={
                                                                   'neurodata_type': 'DynamicTableRegion',
                                                                   'namespace': 'core',
                                                                   'table':  ReferenceBuilder(table_builder),
                                                                   'description': 'the second and fourth electrodes',
                                                                   'help': 'a subset (i.e. slice or region) of a DynamicTable'})})  # noqa: E501
     return (es1, es2)
Exemplo n.º 17
0
 def test_get_subspec_named(self):
     child_spec = GroupSpec('A test group specification with a data type',
                            'my_subgroup')
     parent_spec = GroupSpec('Something to hold a Bar',
                             'my_group',
                             groups=[child_spec])
     sub_builder = GroupBuilder('my_subgroup',
                                attributes={
                                    'data_type': 'Bar',
                                    'namespace': CORE_NAMESPACE
                                })
     builder = GroupBuilder('my_group', groups={'my_bar':
                                                sub_builder})  # noqa: F841
     result = self.type_map.get_subspec(parent_spec, sub_builder)
     self.assertIs(result, child_spec)
Exemplo n.º 18
0
 def setUpBuilder(self):
     TestPlaneSegmentation.get_plane_segmentation_builder(self)
     return GroupBuilder(
         'test_roi_response_series',
         attributes={
             'source': 'RoiResponseSeries integration test',
             'namespace': base.CORE_NAMESPACE,
             'comments': 'no comments',
             'description': 'no description',
             'neurodata_type': 'RoiResponseSeries',
             'help': ('ROI responses over an imaging plane. Each element on the second dimension of data[] '
                      'should correspond to the signal from one ROI')},
         datasets={
             'data': DatasetBuilder(
                 'data', [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
                 attributes={
                     'unit': 'lumens',
                     'conversion': 1.0,
                     'resolution': 0.0}
             ),
             'timestamps': DatasetBuilder('timestamps', [0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9],
                                          attributes={'unit': 'Seconds', 'interval': 1}),
             'rois': DatasetBuilder('rois', RegionBuilder([0], self.rois_builder),
                                    attributes={'help': 'A region reference to an ROITable',
                                                'description': 'the first of two ROIs',
                                                'namespace': 'core',
                                                'neurodata_type': 'ROITableRegion'}),
         })
Exemplo n.º 19
0
 def setUpBuilder(self):
     return GroupBuilder('subject',
                         attributes={
                             'source': 'Subject integration test',
                             'namespace': base.CORE_NAMESPACE,
                             'neurodata_type': 'Subject',
                             'help': 'Information about the subject'
                         },
                         datasets={
                             'age':
                             DatasetBuilder('age', '12 mo'),
                             'description':
                             DatasetBuilder('description',
                                            'An unfortunate rat'),
                             'genotype':
                             DatasetBuilder('genotype', 'WT'),
                             'sex':
                             DatasetBuilder('sex', 'M'),
                             'species':
                             DatasetBuilder('species', 'Rattus norvegicus'),
                             'subject_id':
                             DatasetBuilder('subject_id', 'RAT123'),
                             'weight':
                             DatasetBuilder('weight', '2 lbs')
                         })
Exemplo n.º 20
0
 def test_invalid_missing_req_type(self):
     foo_builder = GroupBuilder('my_foo', attributes={'data_type': 'Foo',
                                                      'foo_attr': text('example Foo object')})
     results = self.vmap.validate(foo_builder)
     self.assertIsInstance(results[0], MissingDataType)  # noqa: F405
     self.assertEqual(results[0].name, 'Foo')
     self.assertEqual(results[0].reason, 'missing data type Bar')
Exemplo n.º 21
0
 def setUpBuilder(self):
     return GroupBuilder('test_timeseries',
                         attributes={
                             'source': 'example_source',
                             'namespace': base.CORE_NAMESPACE,
                             'neurodata_type': 'TimeSeries',
                             'description': 'no description',
                             'comments': 'no comments',
                             'help': 'General time series object'
                         },
                         datasets={
                             'data':
                             DatasetBuilder('data',
                                            list(range(100, 200, 10)),
                                            attributes={
                                                'unit': 'SIunit',
                                                'conversion': 1.0,
                                                'resolution': 0.1
                                            }),
                             'timestamps':
                             DatasetBuilder('timestamps',
                                            list(range(10)),
                                            attributes={
                                                'unit': 'Seconds',
                                                'interval': 1
                                            })
                         })
Exemplo n.º 22
0
 def test_valid(self):
     builder = GroupBuilder('my_bar',
                            attributes={'data_type': 'Bar', 'attr1': text('a string attribute')},
                            datasets=[DatasetBuilder('data', 100, attributes={'attr2': 10})])
     validator = self.vmap.get_validator('Bar')
     result = validator.validate(builder)
     self.assertEqual(len(result), 0)
Exemplo n.º 23
0
 def setUpBuilder(self):
     device_builder = GroupBuilder('dev1',
                                   attributes={'neurodata_type': 'Device',
                                               'namespace': 'core',
                                               'help': 'A recording device e.g. amplifier',
                                               'source': 'a test source'})
     return GroupBuilder('elec1',
                         attributes={'neurodata_type': 'ElectrodeGroup',
                                     'namespace': 'core',
                                     'help': 'A physical grouping of channels',
                                     'description': 'a test ElectrodeGroup',
                                     'location': 'a nonexistent place',
                                     'source': 'a test source'},
                         links={
                             'device': LinkBuilder(device_builder, 'device')
                         })
Exemplo n.º 24
0
 def test_invalid_incorrect_type_validate(self):
     builder = GroupBuilder('my_bar', attributes={'data_type': 'Bar', 'attr1': 10})
     result = self.vmap.validate(builder)
     self.assertEqual(len(result), 2)
     self.assertIsInstance(result[0], DtypeError)  # noqa: F405
     self.assertEqual(result[0].name, 'Bar/attr1')
     self.assertIsInstance(result[1], MissingError)  # noqa: F405
     self.assertEqual(result[1].name, 'Bar/data')
Exemplo n.º 25
0
 def test_invalid_missing(self):
     builder = GroupBuilder('my_bar', attributes={'data_type': 'Bar'})
     validator = self.vmap.get_validator('Bar')
     result = validator.validate(builder)
     self.assertEqual(len(result), 2)
     self.assertIsInstance(result[0], MissingError)  # noqa: F405
     self.assertEqual(result[0].name, 'Bar/attr1')
     self.assertIsInstance(result[1], MissingError)  # noqa: F405
     self.assertEqual(result[1].name, 'Bar/data')
Exemplo n.º 26
0
 def test_mutually_exclusive_subgroups(self):
     gb1 = GroupBuilder('gb1', {'subgroup1': GroupBuilder('subgroup1')})
     gb2 = GroupBuilder('gb2', {'subgroup2': GroupBuilder('subgroup2')})
     gb1.deep_update(gb2)
     self.assertIn('subgroup2', gb1)
     gb1sg = gb1['subgroup2']
     gb2sg = gb2['subgroup2']
     self.assertIs(gb1sg, gb2sg)
Exemplo n.º 27
0
 def test_intersecting_subgroups(self):
     subgroup2 = GroupBuilder('subgroup2')
     gb1 = GroupBuilder('gb1', {
         'subgroup1': GroupBuilder('subgroup1'),
         'subgroup2': subgroup2
     })
     gb2 = GroupBuilder(
         'gb2', {
             'subgroup2': GroupBuilder('subgroup2'),
             'subgroup3': GroupBuilder('subgroup3')
         })
     gb1.deep_update(gb2)
     self.assertIn('subgroup3', gb1)
     self.assertIs(gb1['subgroup3'], gb2['subgroup3'])
     self.assertIs(gb1['subgroup2'], subgroup2)
Exemplo n.º 28
0
 def setUpBuilder(self):
     es = self.setUpElectricalSeriesBuilders()
     ret = GroupBuilder('LFP',
                        attributes={'source': 'LFP roundtrip test',
                                    'namespace': base.CORE_NAMESPACE,
                                    'neurodata_type': 'LFP',
                                    'help': ('LFP data from one or more channels. Filter properties should be '
                                             'noted in the ElectricalSeries')},
                        groups={'test_es1': es[0], 'test_es2': es[1]})
     return ret
Exemplo n.º 29
0
    def get_table_builder(self):
        self.device_builder = GroupBuilder(
            'dev1',
            attributes={
                'neurodata_type': 'Device',
                'namespace': 'core',
                'help': 'A recording device e.g. amplifier',
                'source': 'a test source'
            })
        self.eg_builder = GroupBuilder(
            'tetrode1',
            attributes={
                'neurodata_type': 'ElectrodeGroup',
                'namespace': 'core',
                'help': 'A physical grouping of channels',
                'description': 'tetrode description',
                'location': 'tetrode location',
                'source': 'a test source'
            },
            links={'device': LinkBuilder(self.device_builder, 'device')})

        data = [
            (1, 1.0, 2.0, 3.0, -1.0, 'CA1', 'none', 'first channel of tetrode',
             ReferenceBuilder(self.eg_builder), 'tetrode1'),
            (2, 1.0, 2.0, 3.0, -2.0, 'CA1',
             'none', 'second channel of tetrode',
             ReferenceBuilder(self.eg_builder), 'tetrode1'),
            (3, 1.0, 2.0, 3.0, -3.0, 'CA1', 'none', 'third channel of tetrode',
             ReferenceBuilder(self.eg_builder), 'tetrode1'),
            (4, 1.0, 2.0, 3.0, -4.0, 'CA1',
             'none', 'fourth channel of tetrode',
             ReferenceBuilder(self.eg_builder), 'tetrode1')
        ]
        return DatasetBuilder(
            'electrodes',
            data,
            attributes={
                'neurodata_type': 'ElectrodeTable',
                'namespace': 'core',
                'help':
                'a table for storing data about extracellular electrodes'
            })
Exemplo n.º 30
0
 def test_construct_memoization(self):
     builder = GroupBuilder(
         'my_foo', datasets={'my_data': DatasetBuilder(
             'my_data',
             list(range(10)),
             attributes={'attr2': 10})},
         attributes={'attr1': 'value1', 'namespace': CORE_NAMESPACE, 'data_type': 'Foo'})
     expected = Foo('my_foo', list(range(10)), 'value1', 10)  # noqa: F841
     container1 = self.manager.construct(builder)
     container2 = self.manager.construct(builder)
     self.assertIs(container1, container2)