@pytest.mark.parametrize(units_attr_args, [x for x in units_attr_sets if (x[0] in (u'spherical', u'unitspherical'))])
def test_galactic_spherical_two_components(repr_name, unit1, unit2, unit3, cls2, attr1, attr2, attr3, representation, c1, c2, c3):
 sc = Galactic(((1000 * c1) * u.Unit((unit1 / 1000))), cls2(c2, unit=unit2), representation=representation)
 assert_quantities_allclose(sc, ((c1 * unit1), (c2 * unit2)), (attr1, attr2))
 sc = Galactic((c1 * unit1), (c2 * unit2), representation=representation)
 assert_quantities_allclose(sc, ((c1 * unit1), (c2 * unit2)), (attr1, attr2))
 kwargs = {attr1: (c1 * unit1), attr2: (c2 * unit2)}
 sc = Galactic(representation=representation, **kwargs)
 assert_quantities_allclose(sc, ((c1 * unit1), (c2 * unit2)), (attr1, attr2))

@ pytest . mark . parametrize ( units_attr_args , [ x for x in units_attr_sets if ( x [ 0 ] in ( u'spherical' , u'unitspherical' ) ) ] ) def test_galactic_spherical_two_components ( repr_name , unit1 , unit2 , unit3 , cls2 , attr1 , attr2 , attr3 , representation , c1 , c2 , c3 ) : sc = Galactic ( ( ( 1000 * c1 ) * u . Unit ( ( unit1 / 1000 ) ) ) , cls2 ( c2 , unit = unit2 ) , representation = representation ) assert_quantities_allclose ( sc , ( ( c1 * unit1 ) , ( c2 * unit2 ) ) , ( attr1 , attr2 ) ) sc = Galactic ( ( c1 * unit1 ) , ( c2 * unit2 ) , representation = representation ) assert_quantities_allclose ( sc , ( ( c1 * unit1 ) , ( c2 * unit2 ) ) , ( attr1 , attr2 ) ) kwargs = { attr1 : ( c1 * unit1 ) , attr2 : ( c2 * unit2 ) } sc = Galactic ( representation = representation , ** kwargs ) assert_quantities_allclose ( sc , ( ( c1 * unit1 ) , ( c2 * unit2 ) ) , ( attr1 , attr2 ) )
tests positional inputs using components for spherical representations .