Check with you local gas supplier for rules on u/g gas lines. Here were I live, the gas line ( black iron schd. 40 pipe ) has to enter a building thru a wall above ground, must have 2, 90', joints must be sealed using masters or equivalent pipe dope. Before entering the building a manual gas shut off valve is required The line going thru the wall must be in a conduit, so the gas line won't come in contact with the wall. Once in the building it must be painted yellow. to the appliance. For under ground soft copper is acceptable, joints must be silver soldered. Plastic gas line is also ok but only contractors can buy it. Once the line enters the wall there must be a 2" minimum drip leg. Also before entering the gas appliance another. drip leg is required. All this can be done by the home owner, no contractor required. As far as testing apply 25 psi air for one hour. Attach a gauge, pressure drop has to be less than 1/2 pound per hour. Record and date, sign, your results and post it on the pipe were it enters the building. Inspection is not required but its recommended for insurance purposes.