from ufo2ft.filters.dottedCircleFilter import DottedCircleFilter
from ufo2ft.util import _GlyphSet


def test_dotted_circle_filter(FontClass, datadir):
    ufo_path = datadir.join("DottedCircleTest.ufo")
    font = FontClass(ufo_path)
    assert "uni25CC" not in font
    philter = DottedCircleFilter()
    glyphset = _GlyphSet.from_layer(font)
    modified = philter(font, glyphset)
    assert "uni25CC" in modified
    anchors = list(sorted(glyphset["uni25CC"].anchors, key=lambda x: x.name))
    assert anchors[0].x == 464
    assert anchors[0].y == -17
    assert anchors[0].name == "bottom"

    assert anchors[1].x == 563
    assert anchors[1].y == 546
    assert anchors[1].name == "top"

    assert len(glyphset["uni25CC"]) == 12
    assert int(glyphset["uni25CC"].width) == 688

@@ -338,16 +338,17 @@
 r(font)%0A
+%0A
     modi
@@ -378,16 +378,17 @@
 yphset)%0A
+%0A
     asse
@@ -416,53 +416,412 @@
 ied%0A
+%0A
     
-anchors = list(sorted(glyphset%5B%22uni25CC%22%5D
+dotted_circle = glyphset%5B%22uni25CC%22%5D%0A%0A    # check the Glyph's module is the same as the Font's (both ufoLib2 or defcon,%0A    # not mixed): https://github.com/googlefonts/ufo2ft/issues/644%0A    font_ufo_module = type(font).__module__.split(%22.%22)%5B0%5D%0A    glyph_ufo_module = type(dotted_circle).__module__.split(%22.%22)%5B0%5D%0A    assert glyph_ufo_module == font_ufo_module%0A%0A    anchors = list(sorted(dotted_circle
 .anc
@@ -1065,35 +1065,29 @@
 ert len(
-glyphset%5B%22uni25CC%22%5D
+dotted_circle
 ) == 12%0A
@@ -1101,35 +1101,29 @@
 ert int(
-glyphset%5B%22uni25CC%22%5D
+dotted_circle
 .width) 

check Glyph class module is same as the Font class