Extending a gas line
I always just used an old garden hose when we tested dryers and ranges, did this for over 20 years.
However I can't recommend this, you can temporally use two flex connectors but it is not code to do so.
We bought a bunch of outdoor gas grill connectors that are around 10 feet long, these have a nice quick-connect coupler that has a shut off valve in it so the gas flow stops when it is disconnected, the only problem with the grill connectors is that they are intended for outdoor use only.
John L.