def METHOD_NAME(self):
    # Use the python IO with buffering parameter. Binary mode only:
    # see "test_mode_gzip" for explanation of tuple meanings.
    num_mode_resmode = [
        (0, "ab", "ab"),
        (0, "wb", "wb"),
        (1, "xb", "xb"),
        (1, "rb", "rb"),
    ]
    for num, mode, res in num_mode_resmode:
        filename = self.temp(f"test1{num}.dat")
        with open(filename, mode, buffering=0) as fileobj:
            assert util.fileobj_mode(fileobj) == res