Example #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'))
Example #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"))
Example #6
0
    def test_name_for_symbolic_links(self):

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

        assert_equal("symbolic link", describe("sandbox/symlink"))
Example #7
0
    def test_on_dot_dot_directories(self):

        assert "'..' directory" == describe("./..")
        assert "'..' directory" == describe("sandbox/..")
Example #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"))
Example #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")
Example #11
0
    def test_name_for_symbolic_links(self):

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

        assert "symbolic link" == describe(self.temp_dir / "symlink")
Example #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")
Example #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/..")
Example #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')
Example #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/.."))
Example #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"))
Example #19
0
    def test_name_for_non_existent_entries(self):

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

        assert_equal("non existent", describe('non-existent'))
Example #20
0
    def test_on_directories(self):

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