@@ -0,0 +1,1183 @@
+# -*- coding: utf-8 -*-%0Aimport pytest%0Aimport csv%0A%0Afrom inet.inet import Inet%0A%0A%0Aclass TestInet():%0A    %22%22%22Test the Inet class functions as expected%22%22%22%0A%0A    def test_no_data_file(self):%0A        with pytest.raises(AttributeError):%0A            Inet(data_file=None)%0A%0A    def test_wrong_file_type(self, tmpdir):%0A        with pytest.raises(TypeError):%0A            p = tmpdir.mkdir(%22sub%22).join(%22temp.txt%22)%0A            p.write(%22content%22)%0A            Inet(data_file=str(p))%0A%0A    def test_read_csv(self, tmpdir):%0A        headers = %5B'header1', 'header2'%5D%0A        rows = %5B('AA', 'BB'), ('CC', 'DD')%5D%0A        temp_file = tmpdir.mkdir(%22sub%22).join(%22temp.csv%22)%0A        with open(str(temp_file), 'w') as f:%0A            f_csv = csv.writer(f)%0A            f_csv.writerow(headers)%0A            f_csv.writerows(rows)%0A        inet = Inet(data_file=str(temp_file))%0A        rows = inet.rows%0A        assert len(rows) == 2%0A        assert rows%5B0%5D.header1 == 'AA'%0A        assert rows%5B0%5D.header2 == 'BB'%0A        assert rows%5B1%5D.header1 == 'CC'%0A        assert rows%5B1%5D.header2 == 'DD'%0A%0A        with pytest.raises(AttributeError):%0A            assert rows%5B0%5D.header3 == 'AA'%0A%0Aif __name__ == '__main__':%0A    pytest.main()%0A

Add inet read file tests