package Ġme . lens vol . black connect Ċ Ċ import Ġorg . junit . Test Ċ Ċ class ĠFile Save Trigger TestCase Ġ: ĠBlack Connect TestCase () Ġ{ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġtest _ file _ re formatted _ on _ save _ if _ enabled () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġun formatted File Ġ= Ġopen File In Editor (" un formatted . py ") ĊĠĠĠĠĠĠĠ Ġval Ġdocument Ġ= Ġdocument For File ( un formatted File ) ĊĠĠĠĠĠĠĠ Ġsetup Black d Response ( Black d Response . Black ened (" print (\" 1 2 3 \") ")) ĊĊĠĠĠĠĠĠĠ Ġplugin Configuration . trigger On Each Save Ġ= Ġtrue ĊĠĠĠĠĠĠĠ ĠFile Save Listener ( my Fixture . project ). before Document Saving ( document ) ĊĊĠĠĠĠĠĠĠ Ġmy Fixture . check Result (" print (\" 1 2 3 \") ") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġtest _ file _ is _ not _ re formatted _ on _ save _ if _ disabled () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġun formatted File Ġ= Ġopen File In Editor (" un formatted . py ") ĊĠĠĠĠĠĠĠ Ġval Ġdocument Ġ= Ġdocument For File ( un formatted File ) ĊĠĠĠĠĠĠĠ Ġsetup Black d Response ( Black d Response . Black ened (" print (\" 1 2 3 \") ")) ĊĊĠĠĠĠĠĠĠ Ġplugin Configuration . trigger On Each Save Ġ= Ġfalse ĊĠĠĠĠĠĠĠ ĠFile Save Listener ( my Fixture . project ). before Document Saving ( document ) ĊĊĠĠĠĠĠĠĠ Ġmy Fixture . check Result By File (" un formatted . py ") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġtest _ unsupported _ file _ is _ not _ re formatted _ on _ save _ even _ if _ enabled () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġun formatted File Ġ= Ġopen File In Editor (" not _ python . txt ") ĊĠĠĠĠĠĠĠ Ġval Ġdocument Ġ= Ġdocument For File ( un formatted File ) ĊĠĠĠĠĠĠĠ Ġsetup Black d Response ( Black d Response . Black ened (" print (\" 1 2 3 \") ")) ĊĊĠĠĠĠĠĠĠ Ġplugin Configuration . trigger On Each Save Ġ= Ġtrue ĊĠĠĠĠĠĠĠ ĠFile Save Listener ( my Fixture . project ). before Document Saving ( document ) ĊĊĠĠĠĠĠĠĠ Ġmy Fixture . check Result By File (" not _ python . txt ") ĊĠĠĠ Ġ} Ċ } Ċ