It is generally assumed that one is not allowed to bring a sefer into a bathroom, at least while the bathroom's in use (see Shabbos 127b, Rambam Hilchos Sefer Torah 10:5, Shulchan Aruch YD 282:6, Magen Avraham 43:14, Pri Megadim Eishel Avraham 14, Be'er Heitiv 11, Maharsham 3:357, Mishna Berura 43:25; see http://www.theyeshivaworld.com/weekly_torah.php?id=250). However, it is a common practice to put a potty for a toddler in a room other than a bathroom (when necessary) without necessarily first removing or covering all the seforim in the room. Assuming the child will not only be urinating, is there any basis for this leniency?
Rabbi Yechezkel Feinhandler in his Ginzei Kodesh perek 4:11 writes that it is assur for one to eliminate before seforim(Mordechai in shabbas 3:311,Rama siman 315:1,Mishna Brurah 40:5 )unless they are covered (machlokes how many covers are necessary ).He writes that it is permitted to urinate even if the seforim are uncovered provided that his erva is not uncovered in front of the seforim (back is facing seforim).
As a side note he writes in halacha 12 that changing a babies diaper in front of seforim is also Problematic.
A child should not be diapered or toilet-trained in a room full of seforim. But it is permitted to diaper or train a child in a room where there is an occasional sefer or bencher, etc.(See Machazeh Eliyahu 5-8 for an entire review of this subject. See also Teshuvos Vehanhagos 2:137.)