docstr: Normalization of absolution & relative string paths depending on filesystem
docstr_tok: ["Normalization","of","absolution","&","relative","string","paths","depending","on","filesystem"]
code: def test_hdfs_path(self):
      """Normalization of absolution & relative string paths depending on filesystem"""
      cwd = os.getcwd()
      user = getpass.getuser()
      fs = ["file://", "hdfs://", "viewfs://"]
      paths = {
          "hdfs://foo/bar": [
              "hdfs://foo/bar",
              "hdfs://foo/bar",
              "hdfs://foo/bar",
          ],
          "viewfs://foo/bar": [
              "viewfs://foo/bar",
              "viewfs://foo/bar",
              "viewfs://foo/bar",
          ],
          "file://foo/bar": [
              "file://foo/bar",
              "file://foo/bar",
              "file://foo/bar",
          ],
          "/foo/bar": [
              "file:///foo/bar",
              "hdfs:///foo/bar",
              "viewfs:///foo/bar",
          ],
          "foo/bar": [
              "file://{}/foo/bar".format(cwd),
              "hdfs:///user/{}/foo/bar".format(user),
              "viewfs:///user/{}/foo/bar".format(user),
          ],
      }
  
      for i in range(len(fs)):
          ctx = type(
              "MockContext",
              (),
              {"defaultFS": fs[i], "working_dir": cwd},
          )
          for path, expected in paths.items():
              final_path = TFNode.hdfs_path(ctx, path)
              self.assertEqual(
                  final_path,
                  expected[i],
                  "fs({}) + path({}) => {}, expected {}".format(
                      fs[i], path, final_path, expected[i]
                  ),
              )
  
imports: import getpass
  import os
  import unittest
  from tensorflowonspark import TFManager, TFNode
label_desc: Use image node_id 1 for calling the TFNodeTest obj's underlying member method code with example usage: obj.test_hdfs_path() without return types