Exemplo n.º 1
0
    def test_on_dot_dot_directories(self):

        assert_equal("'..' directory", describe("./.."))
        assert_equal("'..' directory", describe("sandbox/.."))
    def test_name_for_non_existent_entries(self):

        assert not os.path.exists('non-existent')

        assert_equals("non existent", describe('non-existent'))
Exemplo n.º 3
0
    def test_on_directories(self):

        assert_equal("directory", describe('.'))
        assert_equal("directory", describe(".."))
        assert_equal("directory", describe("sandbox"))
    def test_name_for_empty_file(self):

        having_file('sandbox/empty')
        assert_equals("regular empty file", describe("sandbox/empty"))
    def test_name_for_symbolic_links(self):

        os.symlink('nowhere', "sandbox/symlink")

        assert_equals("symbolic link", describe("sandbox/symlink"))
Exemplo n.º 6
0
    def test_name_for_symbolic_links(self):

        os.symlink('nowhere', "sandbox/symlink")

        assert_equal("symbolic link", describe("sandbox/symlink"))
Exemplo n.º 7
0
    def test_on_dot_dot_directories(self):

        assert "'..' directory" == describe("./..")
        assert "'..' directory" == describe("sandbox/..")
Exemplo n.º 8
0
    def test_name_for_non_existent_entries(self):

        assert not os.path.exists(self.temp_dir / 'non-existent')

        assert "non existent" == describe(self.temp_dir / 'non-existent')
    def test_on_directories(self):

        assert_equals("directory", describe('.'))
        assert_equals("directory", describe(".."))
        assert_equals("directory", describe("sandbox"))
Exemplo n.º 10
0
    def test_name_for_empty_file(self):

        make_empty_file(self.temp_dir / 'empty')

        assert "regular empty file" == describe(self.temp_dir / "empty")
Exemplo n.º 11
0
    def test_name_for_symbolic_links(self):

        os.symlink('nowhere', self.temp_dir / "symlink")

        assert "symbolic link" == describe(self.temp_dir / "symlink")
Exemplo n.º 12
0
    def test_name_for_regular_files_non_empty_files(self):

        make_file(self.temp_dir / "non-empty", "contents")

        assert "regular file" == describe(self.temp_dir / "non-empty")
Exemplo n.º 13
0
    def test_on_dot_dot_directories(self):
        require_empty_dir(self.temp_dir / 'a-dir')

        assert "'..' directory" == describe("./..")
        assert "'..' directory" == describe(self.temp_dir / "a-dir/..")
Exemplo n.º 14
0
    def test_on_directories(self):
        require_empty_dir(self.temp_dir / 'a-dir')

        assert "directory" == describe('.')
        assert "directory" == describe("..")
        assert "directory" == describe(self.temp_dir / 'a-dir')
Exemplo n.º 15
0
    def test_name_for_regular_files_non_empty_files(self):

        write_file("sandbox/non-empty", "contents")
        assert_equal("regular file", describe("sandbox/non-empty"))
    def test_on_dot_dot_directories(self):

        assert_equals("'..' directory", describe("./.."))
        assert_equals("'..' directory", describe("sandbox/.."))
Exemplo n.º 17
0
    def test_name_for_empty_file(self):

        make_empty_file('sandbox/empty')
        assert_equal("regular empty file", describe("sandbox/empty"))
    def test_name_for_regular_files_non_empty_files(self):

        write_file("sandbox/non-empty", "contents")
        assert_equals("regular file", describe("sandbox/non-empty"))
Exemplo n.º 19
0
    def test_name_for_non_existent_entries(self):

        assert not os.path.exists('non-existent')

        assert_equal("non existent", describe('non-existent'))
Exemplo n.º 20
0
    def test_on_directories(self):

        assert "directory" == describe('.')
        assert "directory" == describe("..")
        assert "directory" == describe("sandbox")