Example #1
0
    def test_stringify_path_pathlib(self):
        tm._skip_if_no_pathlib()

        rel_path = common._stringify_path(Path('.'))
        self.assertEqual(rel_path, '.')
        redundant_path = common._stringify_path(Path('foo//bar'))
        self.assertEqual(redundant_path, os.path.join('foo', 'bar'))
Example #2
0
    def test_stringify_path_pathlib(self):
        tm._skip_if_no_pathlib()

        rel_path = common._stringify_path(Path('.'))
        assert rel_path == '.'
        redundant_path = common._stringify_path(Path('foo//bar'))
        assert redundant_path == os.path.join('foo', 'bar')
Example #3
0
    def test_stringify_path_pathlib(self):
        tm._skip_if_no_pathlib()

        rel_path = common._stringify_path(Path('.'))
        assert rel_path == '.'
        redundant_path = common._stringify_path(Path('foo//bar'))
        assert redundant_path == os.path.join('foo', 'bar')
 def test_path_pathlib(self):
     tm._skip_if_no_pathlib()
     from pathlib import Path
     for j in 0, 1:
         df0 = self.data[j]
         for k in self.test_ix[j]:
             fname = Path(os.path.join(self.dirpath, "test%d.sas7bdat" % k))
             df = pd.read_sas(fname, encoding='utf-8')
             tm.assert_frame_equal(df, df0)
 def test_path_pathlib(self):
     tm._skip_if_no_pathlib()
     from pathlib import Path
     for j in 0, 1:
         df0 = self.data[j]
         for k in self.test_ix[j]:
             fname = Path(os.path.join(self.dirpath, "test%d.sas7bdat" % k))
             df = pd.read_sas(fname, encoding='utf-8')
             tm.assert_frame_equal(df, df0)