Under what circumstances shall a valve in a line be used as a bulkhead between gas in one section of the pipe system and a test medium in an ajacent section?

Under what circumstances shall a valve in a line be used as a bulkhead between gas in one section of the pipe system and a test medium in an ajacent section?